Skip to content

Commit

Permalink
Fix nightly releases (#395)
Browse files Browse the repository at this point in the history
  • Loading branch information
MGaetan89 authored Jan 17, 2024
1 parent f1847b4 commit 48d28eb
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions .github/workflows/nightly.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ on:
required: true
type: string
schedule:
- cron: '0 0 * * *'
- cron: '0 0 * * *'

jobs:
check_date:
Expand All @@ -26,7 +26,13 @@ jobs:
- id: should_run
name: Check that the last commit was made in the last 24h
if: ${{ github.event_name == 'schedule' }}
run: test -z $(git rev-list --after="24 hours" ${{ github.sha }}) && echo "should_run=false" >> "$GITHUB_OUTPUT"
run: >
new_commits=$(git log --since="24 hours ago" --oneline)
if [[ -n "$new_commits" ]]; then
echo "should_run=true" >> "$GITHUB_OUTPUT"
else
echo "should_run=false" >> "$GITHUB_OUTPUT"
fi
Build-nightly:
needs: check_date
Expand Down

0 comments on commit 48d28eb

Please sign in to comment.