Skip to content

Commit

Permalink
feat: add concurrency to workflow
Browse files Browse the repository at this point in the history
Allow only one workflow at that time.

If a second workflow is triggered, it will be put in pending state, and
only start once the first workflow finish.
If the workflow is triggered a third time while the first one is
running, the second workflow is canceled, and the third takes over the
pending state.

Fix opentofu#163.

Signed-off-by: Alejandro Lazaro <[email protected]>
  • Loading branch information
virtualroot committed Mar 2, 2024
1 parent c7c61b7 commit cba412e
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion .github/workflows/bump-and-publish-versions-prod.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,9 @@ on:
- cron: '5 * * * *'
workflow_dispatch:

concurrency:
group: ${{ github.head_ref }}

jobs:
bump-versions:
uses: opentofu/registry/.github/workflows/bump-versions.yml@main
Expand All @@ -17,4 +20,4 @@ jobs:
uses: opentofu/registry/.github/workflows/generate-and-deploy.yml@main
secrets: inherit
with:
environment: "Production"
environment: "Production"

0 comments on commit cba412e

Please sign in to comment.