Skip to content

Commit

Permalink
github: build-gluon: cancel obsolete in progress workflows for PRs (f…
Browse files Browse the repository at this point in the history
…reifunk-gluon#3115)

Goal is to cancel Worfklows for Pull Request if they become obsolte
due to new changes.
Without this workflows will continue running, wasting resources and
delaying the run of relevant workflows.
This situation will typically occour if a author of a PR notices an
error/typo/missing bit and pushes new changes to the branch.

This won't affect concurrent workflows for otherwise triggered
workflows (push, workflow_dispatch, tag, ...).
  • Loading branch information
herbetom authored Dec 26, 2023
1 parent db0e7bd commit 1523a2f
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions .github/workflows/build-gluon.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,10 @@ on:
permissions:
contents: read

concurrency:
group: ${{ github.workflow }}-${{ github.ref || github.run_id }}-${{ github.event.pull_request.number || github.run_id }}
cancel-in-progress: true

jobs:
changed:
permissions:
Expand Down

0 comments on commit 1523a2f

Please sign in to comment.