Skip to content

Commit

Permalink
Fix possible race condition in deployment actions
Browse files Browse the repository at this point in the history
  • Loading branch information
mvandenburgh committed Sep 11, 2023
1 parent ba39f60 commit 9b4fb25
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 0 deletions.
7 changes: 7 additions & 0 deletions .github/workflows/backend-production-deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,13 @@ on:
release:
types: [released]

concurrency:
# If this workflow is already running, cancel it to avoid a scenario
# where the older run finishes *after* the newer run and overwrites
# the deployment with an older version of the app.
group: ${{ github.workflow }}
cancel-in-progress: true

jobs:
reset-release-branch:
name: Update release branch
Expand Down
7 changes: 7 additions & 0 deletions .github/workflows/backend-staging-deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,13 @@ on:
paths-ignore:
- "web/**"

concurrency:
# If this workflow is already running, cancel it to avoid a scenario
# where the older run finishes *after* the newer run and overwrites
# the deployment with an older version of the app.
group: ${{ github.workflow }}
cancel-in-progress: true

jobs:
deploy:
name: Deploy to Heroku
Expand Down

0 comments on commit 9b4fb25

Please sign in to comment.