Skip to content

Commit bebe7f0

Browse files
authored
Merge pull request #731 from NHSDigital/DTOSS-11666-delete-review-cancelled
[DTOSS-11666] Update github actions concurrency
2 parents ce6975e + a78207e commit bebe7f0

File tree

3 files changed

+7
-2
lines changed

3 files changed

+7
-2
lines changed

.github/workflows/cicd-1-pull-request-closed.yaml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,8 @@ jobs:
1313
pull-requests: write
1414
runs-on: ubuntu-latest
1515
environment: review
16-
concurrency: deploy-review-${{ github.ref }}
16+
# Prevent concurrent jobs on the same environment and between deploy and delete workflows
17+
concurrency: deploy-review-${{ github.event.pull_request.number }}
1718

1819
steps:
1920
- name: Checkout code

.github/workflows/cicd-2-main-branch.yaml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,9 @@ on:
44
push:
55
branches: [main]
66

7+
# Set concurrency at the workflow level to ensure the same commit runs tests and deployment consistently
8+
concurrency: deploy-workflow-main
9+
710
jobs:
811
metadata:
912
name: 'Set CI/CD metadata'

.github/workflows/stage-4-deploy.yaml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,8 @@ jobs:
2525
environment: ${{ fromJson(inputs.environments) }}
2626
max-parallel: 1
2727
environment: ${{ matrix.environment }}
28-
concurrency: deploy-${{ matrix.environment }}-${{ github.ref }}
28+
# Prevent concurrent jobs on the same environment and between deploy and delete workflows
29+
concurrency: deploy-${{ matrix.environment }}-${{inputs.pr_number}}
2930

3031
steps:
3132
- name: Checkout code

0 commit comments

Comments
 (0)