Run based on commits since last successful nightly run
This commit is contained in:
6
.github/workflows/nightly.yml
vendored
6
.github/workflows/nightly.yml
vendored
@@ -19,9 +19,11 @@ jobs:
|
|||||||
with:
|
with:
|
||||||
fetch-depth: 0
|
fetch-depth: 0
|
||||||
submodules: recursive
|
submodules: recursive
|
||||||
- name: Get new commits
|
- name: Get new commits since last successful run
|
||||||
id: commits
|
id: commits
|
||||||
run: echo "NEW_COMMIT_COUNT=$(git log --oneline --since '24 hours ago' | wc -l)" >> $GITHUB_OUTPUT
|
run: |
|
||||||
|
COUNT=$(gh api -H 'Accept: application/vnd.github+json' -H "X-GitHub-Api-Version: 2022-11-28" https://api.github.com/repos/technyon/nuki_hub/actions/workflows/nightly.yml/runs?status=success | jq '.workflow_runs[0].created_at')
|
||||||
|
echo "NEW_COMMIT_COUNT=$(git log --oneline --since $COUNT | wc -l)" >> $GITHUB_OUTPUT
|
||||||
build:
|
build:
|
||||||
name: Build ${{ matrix.board }} (${{ matrix.build }})
|
name: Build ${{ matrix.board }} (${{ matrix.build }})
|
||||||
needs: check-commits
|
needs: check-commits
|
||||||
|
|||||||
Reference in New Issue
Block a user