mirror of
https://github.com/dalathegreat/Battery-Emulator.git
synced 2025-10-03 09:49:32 +02:00
add skip-duplicate-actions to batteries workflow
This commit is contained in:
parent
c94120bd5e
commit
0231b2230d
1 changed files with 20 additions and 4 deletions
24
.github/workflows/compile-all-batteries.yml
vendored
24
.github/workflows/compile-all-batteries.yml
vendored
|
@ -9,12 +9,28 @@ on:
|
||||||
- pull_request
|
- pull_request
|
||||||
|
|
||||||
# This is the list of jobs that will be run concurrently.
|
# This is the list of jobs that will be run concurrently.
|
||||||
# Since we use a build matrix, the actual number of jobs
|
|
||||||
# started depends on how many configurations the matrix
|
|
||||||
# will produce.
|
|
||||||
jobs:
|
jobs:
|
||||||
# This is the name of the job
|
# This pre-job is run to skip workflows in case a workflow is already run, i.e. because the workflow is triggered by both push and pull_request
|
||||||
|
pre_job:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
# Map a step output to a job output
|
||||||
|
outputs:
|
||||||
|
should_skip: ${{ steps.skip_check.outputs.should_skip }}
|
||||||
|
steps:
|
||||||
|
- id: skip_check
|
||||||
|
uses: fkirc/skip-duplicate-actions@v5
|
||||||
|
with:
|
||||||
|
# All of these options are optional, so you can remove them if you are happy with the defaults
|
||||||
|
concurrent_skipping: 'never'
|
||||||
|
skip_after_successful_duplicate: 'true'
|
||||||
|
do_not_skip: '["pull_request", "workflow_dispatch", "schedule"]'
|
||||||
|
|
||||||
|
# Since we use a build matrix, the actual number of jobs
|
||||||
|
# started depends on how many configurations the matrix
|
||||||
|
# will produce.
|
||||||
build-batteries:
|
build-batteries:
|
||||||
|
needs: pre_job
|
||||||
|
if: needs.pre_job.outputs.should_skip != 'true'
|
||||||
|
|
||||||
# Here we tell GitHub that the jobs must be determined
|
# Here we tell GitHub that the jobs must be determined
|
||||||
# dynamically depending on a matrix configuration.
|
# dynamically depending on a matrix configuration.
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue