Skip to content

Commit 3862d46

Browse files
committed
Only run one review-apps workflow at a time
This prevents us attempting to run multiple instance of terraform at the same time. Instead, the current running workflow will complete before the next one starts. Only 1 running and 1 pending workflow is allowed - any further workflows will supercede the pending one.
1 parent 8b35465 commit 3862d46

File tree

2 files changed

+8
-0
lines changed

2 files changed

+8
-0
lines changed

.github/workflows/review_apps_on_pr_change.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,10 @@ on:
55
# matches the docs for the default types
66
# https://docs.github.com/en/actions/writing-workflows/choosing-when-your-workflow-runs/events-that-trigger-workflows#pull_request
77
types: [opened, reopened, synchronize]
8+
9+
concurrency:
10+
group: "review-apps-forms-runner-pr-${{ github.event.pull_request.number }}"
11+
cancel-in-progress: false
812
jobs:
913
update-review-app:
1014
runs-on: ubuntu-24.04-arm

.github/workflows/review_apps_on_pr_close.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,10 @@ on:
33
pull_request:
44
# only run when a PR is closed or merged
55
types: [closed]
6+
7+
concurrency:
8+
group: "review-apps-forms-runner-pr-${{ github.event.pull_request.number }}"
9+
cancel-in-progress: false
610
env:
711
IMAGE_TAG: "842676007477.dkr.ecr.eu-west-2.amazonaws.com/forms-runner:pr-${{github.event.pull_request.number}}-${{github.event.pull_request.head.ref}}"
812
jobs:

0 commit comments

Comments
 (0)