Skip to content

Commit

Permalink
feat: cancel stale actions workflows (#741)
Browse files Browse the repository at this point in the history
Syncs with latest addon blueprint, per ember-cli/ember-cli#9697

This uses Github Action's
[concurrency](https://docs.github.com/en/actions/learn-github-actions/workflow-syntax-for-github-actions#concurrency)
feature to kill the workflow runs of commits that are not the current
head commit of a PR.  `head_ref` is only set for PRs
[source](https://docs.github.com/en/actions/learn-github-actions/contexts#github-context),
which is why we fall back to `ref` (so push workflows will run one job
for each branch for the most recent commit).
  • Loading branch information
SergeAstapov committed May 4, 2022
1 parent a3a26c5 commit 272a8ea
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,10 @@ on:
schedule:
- cron: '0 3 * * *' # daily, at 3am

concurrency:
group: ci-${{ github.head_ref || github.ref }}
cancel-in-progress: true

jobs:
lint:
name: Lint
Expand Down

0 comments on commit 272a8ea

Please sign in to comment.