summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJohn L. Villalovos <john@sodarock.com>2021-12-07 22:03:04 -0800
committerJohn L. Villalovos <john@sodarock.com>2021-12-07 23:55:33 -0800
commitfd8156991556706f776c508c373224b54ef4e14f (patch)
tree45991dd2dfcd02895f04d84e84773d16b0e32770
parent83f36d6de5bf6b6bcb9e56243b414bff0093db72 (diff)
downloadgitlab-fd8156991556706f776c508c373224b54ef4e14f.tar.gz
chore: github workflow: cancel prior running jobs on new push
If new new push is done to a pull-request, then cancel any already running github workflow jobs in order to conserve resources.
-rw-r--r--.github/workflows/docs.yml6
-rw-r--r--.github/workflows/lint.yml6
-rw-r--r--.github/workflows/pre_commit.yml6
-rw-r--r--.github/workflows/test.yml6
4 files changed, 24 insertions, 0 deletions
diff --git a/.github/workflows/docs.yml b/.github/workflows/docs.yml
index 0dce859..c635be4 100644
--- a/.github/workflows/docs.yml
+++ b/.github/workflows/docs.yml
@@ -1,5 +1,11 @@
name: Docs
+# If a pull-request is pushed then cancel all previously running jobs related
+# to that pull-request
+concurrency:
+ group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.sha }}
+ cancel-in-progress: true
+
on:
push:
branches:
diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml
index 259cd71..840909d 100644
--- a/.github/workflows/lint.yml
+++ b/.github/workflows/lint.yml
@@ -1,5 +1,11 @@
name: Lint
+# If a pull-request is pushed then cancel all previously running jobs related
+# to that pull-request
+concurrency:
+ group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.sha }}
+ cancel-in-progress: true
+
on:
push:
branches:
diff --git a/.github/workflows/pre_commit.yml b/.github/workflows/pre_commit.yml
index 87f6387..d109e5d 100644
--- a/.github/workflows/pre_commit.yml
+++ b/.github/workflows/pre_commit.yml
@@ -1,5 +1,11 @@
name: pre_commit
+# If a pull-request is pushed then cancel all previously running jobs related
+# to that pull-request
+concurrency:
+ group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.sha }}
+ cancel-in-progress: true
+
on:
push:
branches:
diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml
index 62c2221..d13f600 100644
--- a/.github/workflows/test.yml
+++ b/.github/workflows/test.yml
@@ -1,5 +1,11 @@
name: Test
+# If a pull-request is pushed then cancel all previously running jobs related
+# to that pull-request
+concurrency:
+ group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.sha }}
+ cancel-in-progress: true
+
on:
push:
branches: