ci(build): limit run scope
* Cancel redundant non-nightly runs and jobs dependent on canceled jobs. * Limit scheduled runs to zmkfirmware-owned repos.
This commit is contained in:
parent
7c9477be6e
commit
9c6d1af102
1 changed files with 6 additions and 2 deletions
8
.github/workflows/build.yml
vendored
8
.github/workflows/build.yml
vendored
|
@ -12,6 +12,10 @@ on:
|
||||||
schedule:
|
schedule:
|
||||||
- cron: "22 4 * * *"
|
- cron: "22 4 * * *"
|
||||||
|
|
||||||
|
concurrency:
|
||||||
|
group: ${{ github.workflow }}-${{ github.ref }}-${{ github.event_name == 'schedule' }}
|
||||||
|
cancel-in-progress: true
|
||||||
|
|
||||||
permissions: {}
|
permissions: {}
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
|
@ -135,7 +139,7 @@ jobs:
|
||||||
throw new Error('Failed to build one or more configurations');
|
throw new Error('Failed to build one or more configurations');
|
||||||
}
|
}
|
||||||
compile-matrix:
|
compile-matrix:
|
||||||
if: ${{ always() }}
|
if: ${{ !cancelled() }}
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
needs: [core-coverage, board-changes, nightly]
|
needs: [core-coverage, board-changes, nightly]
|
||||||
outputs:
|
outputs:
|
||||||
|
@ -290,7 +294,7 @@ jobs:
|
||||||
});
|
});
|
||||||
}))).flat();
|
}))).flat();
|
||||||
nightly:
|
nightly:
|
||||||
if: ${{ github.event_name == 'schedule' }}
|
if: ${{ github.event_name == 'schedule' && github.repository_owner == 'zmkfirmware' }}
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
needs: get-grouped-hardware
|
needs: get-grouped-hardware
|
||||||
outputs:
|
outputs:
|
||||||
|
|
Loading…
Add table
Reference in a new issue