Nightly Build #63
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Nightly Build | |
on: | |
workflow_dispatch: # allows manual triggering | |
schedule: | |
- cron: '14 0 * * *' # runs daily at 00:14 | |
jobs: | |
nightly-detect: | |
runs-on: ubuntu-latest | |
outputs: | |
new-commits: ${{ steps.count-commits.outputs.count }} | |
steps: | |
- uses: actions/checkout@v3 | |
with: | |
fetch-depth: 0 # Required to count the commits | |
- name: Get new commits | |
id: count-commits | |
run: | | |
count=$(git log --oneline --since '24 hours ago' | wc -l) | |
echo "Saw $count commits" | |
echo "count=$count" >> $GITHUB_OUTPUT | |
nightly-build: | |
uses: ./.github/workflows/build.yml | |
needs: nightly-detect | |
if: needs.nightly-detect.outputs.new-commits > 0 | |
with: | |
firmware-retention-days: 30 | |
build-type: 'nightly' |