Skip to content

Commit

Permalink
ci(.github/workflows/{build,dependent-issues}.yml): auto-cancel workf…
Browse files Browse the repository at this point in the history
…lows on previous commits (#7536)

After this is merged, pushing a new commit to a branch in this repo should cancel the "continuous integration" and "dependent issues" workflows running on any older commits on that branch.
  • Loading branch information
bryangingechen committed May 7, 2021
1 parent 93f9b3d commit 6a7ddcc
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 0 deletions.
10 changes: 10 additions & 0 deletions .github/workflows/build.yml
Expand Up @@ -12,6 +12,16 @@ on:
- 'lean-3.*'

jobs:
cancel:
name: 'Cancel Previous Runs (CI)'
runs-on: ubuntu-latest
# timeout-minutes: 3
steps:
- uses: styfle/cancel-workflow-action@0.9.0
with:
all_but_latest: true
access_token: ${{ github.token }}

lint_self_test:
name: Ensure the linter works
runs-on: ${{ matrix.os }}
Expand Down
10 changes: 10 additions & 0 deletions .github/workflows/dependent-issues.yml
Expand Up @@ -16,6 +16,16 @@ on:
- cron: '15 * * * *' # schedule hourly check for external dependencies

jobs:
cancel:
name: 'Cancel Previous Runs (dependent issues)'
runs-on: ubuntu-latest
# timeout-minutes: 3
steps:
- uses: styfle/cancel-workflow-action@0.9.0
with:
all_but_latest: true
access_token: ${{ github.token }}

check:
runs-on: ubuntu-latest
steps:
Expand Down

0 comments on commit 6a7ddcc

Please sign in to comment.