Skip to content

Commit cf38137

Browse files
committed
ci: Cancel running workflows if retriggered
For rationale, see <https://turso.tech/blog/simple-trick-to-save-environment-and-money-when-using-github-actions>. For the GitHub Pages and Godot Asset Library actions, each run overwrites the result of any previous run, so the concurrency group is just the workflow name.
1 parent 3f215af commit cf38137

File tree

2 files changed

+10
-0
lines changed

2 files changed

+10
-0
lines changed

.github/workflows/github-pages.yml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,11 @@ on:
55
types:
66
- published
77

8+
# Cancel any ongoing previous run if the job is re-triggered
9+
concurrency:
10+
group: ${{ github.workflow }}
11+
cancel-in-progress: true
12+
813
permissions:
914
contents: read
1015
pages: write

.github/workflows/godot-asset-library.yaml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,11 @@ on:
33
types:
44
- published
55

6+
# Cancel any ongoing previous run if the job is re-triggered
7+
concurrency:
8+
group: ${{ github.workflow }}
9+
cancel-in-progress: true
10+
611
name: Push to Godot Asset Library
712

813
jobs:

0 commit comments

Comments
 (0)