Skip to content

Commit 6893bca

Browse files
authored
Cancel running workflow when new commits are pushed in a pull request (#160)
1 parent a76e303 commit 6893bca

File tree

5 files changed

+15
-0
lines changed

5 files changed

+15
-0
lines changed

.github/workflows/build-image.yaml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,9 @@ on:
77
tags:
88
- v*
99
pull_request:
10+
concurrency:
11+
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
12+
cancel-in-progress: true
1013
env:
1114
IMAGE_NAME: netbox-operator
1215
DOCKER_METADATA_PR_HEAD_SHA: true

.github/workflows/govuln.yaml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,9 @@ on:
77
tags:
88
- v*
99
pull_request:
10+
concurrency:
11+
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
12+
cancel-in-progress: true
1013
permissions: read-all
1114
jobs:
1215
test:

.github/workflows/integration-test.yaml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,9 @@ on:
77
tags:
88
- v*
99
pull_request:
10+
concurrency:
11+
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
12+
cancel-in-progress: true
1013
permissions:
1114
contents: read
1215
jobs:

.github/workflows/lint.yaml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,9 @@ on:
77
tags:
88
- v*
99
pull_request:
10+
concurrency:
11+
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
12+
cancel-in-progress: true
1013
permissions: read-all
1114
jobs:
1215
run:

.github/workflows/unit-test.yaml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,9 @@ on:
77
tags:
88
- v*
99
pull_request:
10+
concurrency:
11+
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
12+
cancel-in-progress: true
1013
permissions:
1114
contents: read
1215
jobs:

0 commit comments

Comments
 (0)