Skip to content

Commit

Permalink
fix(ci): allow terraform jobs to run concurrently when they target di…
Browse files Browse the repository at this point in the history
…fferent workspaces (#89)

When I split the terraform workflow in two different workflows to make
it reusable in #83 I mistakenly used the same concurrency group for
both, which prevents the child workflow from running.

This PR adds the workspace to the concurrency group key so that only
workflows that target the same workspace share the same concurrency
group.
  • Loading branch information
volmedo authored Jan 17, 2025
1 parent 4f248fa commit 95c196a
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 5 deletions.
4 changes: 0 additions & 4 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,10 +19,6 @@ on:
branches: [main]
workflow_dispatch:

concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: true

permissions:
id-token: write # This is required for requesting the JWT
contents: read # This is required for actions/checkout
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/terraform.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ on:
required: true

concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
group: ${{ github.workflow }}-${{ inputs.workspace }}-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: true

env:
Expand Down

0 comments on commit 95c196a

Please sign in to comment.