Skip to content

Commit 154f862

Browse files
authored
Merge pull request #622 from dev-sec/stop_old_tests
cancel running tests if new commit to branch is made
2 parents 85271c2 + db4bd32 commit 154f862

File tree

6 files changed

+48
-0
lines changed

6 files changed

+48
-0
lines changed

.github/workflows/mysql_hardening.yml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,14 @@ on: # yamllint disable-line rule:truthy
1515
- 'roles/mysql_hardening/**'
1616
- 'molecule/mysql_hardening/**'
1717
- '.github/workflows/mysql_hardening.yml'
18+
19+
concurrency:
20+
group: >-
21+
${{ github.workflow }}-${{
22+
github.event.pull_request.number || github.sha
23+
}}
24+
cancel-in-progress: true
25+
1826
jobs:
1927
build:
2028
runs-on: ubuntu-18.04

.github/workflows/nginx_hardening.yml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,14 @@ on: # yamllint disable-line rule:truthy
1414
- 'roles/nginx_hardening/**'
1515
- 'molecule/nginx_hardening/**'
1616
- '.github/workflows/nginx_hardening.yml'
17+
18+
concurrency:
19+
group: >-
20+
${{ github.workflow }}-${{
21+
github.event.pull_request.number || github.sha
22+
}}
23+
cancel-in-progress: true
24+
1725
jobs:
1826
build:
1927
runs-on: ubuntu-18.04

.github/workflows/os_hardening.yml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,14 @@ on: # yamllint disable-line rule:truthy
1414
- 'roles/os_hardening/**'
1515
- 'molecule/os_hardening/**'
1616
- '.github/workflows/os_hardening.yml'
17+
18+
concurrency:
19+
group: >-
20+
${{ github.workflow }}-${{
21+
github.event.pull_request.number || github.sha
22+
}}
23+
cancel-in-progress: true
24+
1725
jobs:
1826
build:
1927
runs-on: ubuntu-18.04

.github/workflows/os_hardening_vm.yml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,14 @@ on: # yamllint disable-line rule:truthy
1414
- 'roles/os_hardening/**'
1515
- 'molecule/os_hardening_vm/**'
1616
- '.github/workflows/os_hardening_vm.yml'
17+
18+
concurrency:
19+
group: >-
20+
${{ github.workflow }}-${{
21+
github.event.pull_request.number || github.sha
22+
}}
23+
cancel-in-progress: true
24+
1725
jobs:
1826
build:
1927
runs-on: self-hosted

.github/workflows/ssh_hardening.yml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,14 @@ on: # yamllint disable-line rule:truthy
1414
- 'roles/ssh_hardening/**'
1515
- 'molecule/ssh_hardening/**'
1616
- '.github/workflows/ssh_hardening.yml'
17+
18+
concurrency:
19+
group: >-
20+
${{ github.workflow }}-${{
21+
github.event.pull_request.number || github.sha
22+
}}
23+
cancel-in-progress: true
24+
1725
jobs:
1826
build:
1927
runs-on: ubuntu-18.04

.github/workflows/ssh_hardening_custom_tests.yml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,14 @@ on: # yamllint disable-line rule:truthy
1414
- 'roles/ssh_hardening/**'
1515
- 'molecule/ssh_hardening_custom_tests/**'
1616
- '.github/workflows/ssh_hardening_custom_tests.yml'
17+
18+
concurrency:
19+
group: >-
20+
${{ github.workflow }}-${{
21+
github.event.pull_request.number || github.sha
22+
}}
23+
cancel-in-progress: true
24+
1725
jobs:
1826
build:
1927
runs-on: ubuntu-18.04

0 commit comments

Comments
 (0)