Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix concurrency in atlantis-image workflow #2556

Merged
merged 1 commit into from
Oct 6, 2022

Conversation

nitrocode
Copy link
Member

@nitrocode nitrocode commented Oct 5, 2022

what

  • Set the concurrency to replace head_ref with ref
  • Set the concurrency to replace run_id with run_number

why

  • Fix concurrency in atlantis-image workflow
  • Use ref because head_ref is only for pull_request events and this workflow does not run on PRs
  • Use run_number because the id is always unique whereas the number starts at 1 and continues for each workflow

references

github.run_id string A unique number for each workflow run within a repository. This number does not change if you re-run the workflow run.

github.run_number string A unique number for each run of a particular workflow in a repository. This number begins at 1 for the workflow's first run, and increments with each new run. This number does not change if you re-run the workflow run.

Relevant atlantis-image workflow code

on:
push:
branches:
- 'master'
tags:
- v*.*.* # stable release like, v0.19.2
- v*.*.*-pre.* # pre release like, v0.19.0-pre.calendardate
workflow_dispatch:
concurrency:
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
cancel-in-progress: true

The atlantis-base workflow seems unaffected

https://github.com/runatlantis/atlantis/actions/workflows/atlantis-base.yml

@nitrocode nitrocode requested a review from a team as a code owner October 5, 2022 23:04
@jamengual
Copy link
Contributor

Thanks @nitrocode for the contribution

@jamengual jamengual merged commit 8d54326 into runatlantis:master Oct 6, 2022
jamengual added a commit that referenced this pull request Oct 7, 2022
jamengual added a commit that referenced this pull request Oct 7, 2022
krrrr38 pushed a commit to krrrr38/atlantis that referenced this pull request Dec 16, 2022
krrrr38 pushed a commit to krrrr38/atlantis that referenced this pull request Dec 16, 2022
@nitrocode nitrocode modified the milestones: 0.21.0, v0.21.0, v0.20.0 Jan 13, 2023
@nitrocode nitrocode deleted the atlantis-image-concurrency branch January 26, 2023 00:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants