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

Use concurrency for GitHub Actions workflow #1539

Merged
merged 1 commit into from
Jan 6, 2023

Conversation

ydah
Copy link
Member

@ydah ydah commented Jan 5, 2023

This PR ensures that only the last execution per branch always works, even when pushed multiple times in a row, for example. The older one is canceled.

I tried it on this branch and sure enough, all but the most recent workflow is cancelled.
https://github.com/rubocop/rubocop-rspec/actions/runs/3848207691
https://github.com/rubocop/rubocop-rspec/actions/runs/3848207692
https://github.com/rubocop/rubocop-rspec/actions/runs/3848207694

Refs:
https://docs.github.com/en/actions/using-jobs/using-concurrency https://github.blog/changelog/2021-04-19-github-actions-limit-workflow-run-or-job-concurrency/


Before submitting the PR make sure the following are checked:

  • Feature branch is up-to-date with master (if not - rebase it).
  • Squashed related commits together.
  • [-] Added tests.
  • [-] Updated documentation.
  • [-] Added an entry to the CHANGELOG.md if the new code introduces user-observable changes.
  • The build (bundle exec rake) passes (be sure to run this locally, since it may produce updated documentation that you will need to commit).

This PR ensures that only the last execution per branch
always works, even when pushed multiple times in a row,
for example. The older one is canceled.

Refs:
https://docs.github.com/en/actions/using-jobs/using-concurrency
https://github.blog/changelog/2021-04-19-github-actions-limit-workflow-run-or-job-concurrency/
@pirj pirj merged commit 32a43ed into rubocop:master Jan 6, 2023
@pirj
Copy link
Member

pirj commented Jan 6, 2023

This is so good, thank you! I can't believe this feature is nearly 2 years old now, I've completely missed it from the docs.

ydah added a commit to ydah/rubocop that referenced this pull request Jan 7, 2023
Same as: rubocop/rubocop-rspec#1539

This PR ensures that only the last execution per branch always works, even when pushed multiple times in a row, for example. The older one is canceled.

Refs:
https://docs.github.com/en/actions/using-jobs/using-concurrency https://github.blog/changelog/2021-04-19-github-actions-limit-workflow-run-or-job-concurrency/
ydah added a commit to rubocop/rubocop-capybara that referenced this pull request Jan 7, 2023
Same as: rubocop/rubocop-rspec#1539

This PR ensures that only the last execution per branch always works, even when pushed multiple times in a row, for example. The older one is canceled.

Refs:
https://docs.github.com/en/actions/using-jobs/using-concurrency https://github.blog/changelog/2021-04-19-github-actions-limit-workflow-run-or-job-concurrency/
ydah added a commit to ydah/rubocop-rails that referenced this pull request Jan 7, 2023
Same as: rubocop/rubocop-rspec#1539

This PR ensures that only the last execution per branch always works, even when pushed multiple times in a row, for example. The older one is canceled.

Refs:
https://docs.github.com/en/actions/using-jobs/using-concurrency https://github.blog/changelog/2021-04-19-github-actions-limit-workflow-run-or-job-concurrency/
ydah added a commit to ydah/rubocop-performance that referenced this pull request Jan 7, 2023
Same as: rubocop/rubocop-rspec#1539

This PR ensures that only the last execution per branch always works, even when pushed multiple times in a row, for example. The older one is canceled.

Refs:
https://docs.github.com/en/actions/using-jobs/using-concurrency https://github.blog/changelog/2021-04-19-github-actions-limit-workflow-run-or-job-concurrency/
ydah added a commit to ydah/rubocop-performance that referenced this pull request Jan 7, 2023
Same as: rubocop/rubocop-rspec#1539

This PR ensures that only the last execution per branch always works, even when pushed multiple times in a row, for example. The older one is canceled.

Refs:
https://docs.github.com/en/actions/using-jobs/using-concurrency https://github.blog/changelog/2021-04-19-github-actions-limit-workflow-run-or-job-concurrency/
ydah added a commit to ydah/rubocop-minitest that referenced this pull request Jan 7, 2023
Same as: rubocop/rubocop-rspec#1539

This PR ensures that only the last execution per branch always works, even when pushed multiple times in a row, for example. The older one is canceled.

Refs:
https://docs.github.com/en/actions/using-jobs/using-concurrency https://github.blog/changelog/2021-04-19-github-actions-limit-workflow-run-or-job-concurrency/
ydah added a commit to ydah/rubocop-ast that referenced this pull request Jan 7, 2023
Same as: rubocop/rubocop-rspec#1539

This PR ensures that only the last execution per branch always works, even when pushed multiple times in a row, for example. The older one is canceled.

Refs:
https://docs.github.com/en/actions/using-jobs/using-concurrency https://github.blog/changelog/2021-04-19-github-actions-limit-workflow-run-or-job-concurrency/
bbatsov pushed a commit to rubocop/rubocop that referenced this pull request Jan 7, 2023
Same as: rubocop/rubocop-rspec#1539

This PR ensures that only the last execution per branch always works, even when pushed multiple times in a row, for example. The older one is canceled.

Refs:
https://docs.github.com/en/actions/using-jobs/using-concurrency https://github.blog/changelog/2021-04-19-github-actions-limit-workflow-run-or-job-concurrency/
pirj pushed a commit to rubocop/rubocop-capybara that referenced this pull request Jan 7, 2023
Same as: rubocop/rubocop-rspec#1539

This PR ensures that only the last execution per branch always works, even when pushed multiple times in a row, for example. The older one is canceled.

Refs:
https://docs.github.com/en/actions/using-jobs/using-concurrency https://github.blog/changelog/2021-04-19-github-actions-limit-workflow-run-or-job-concurrency/
bbatsov pushed a commit to rubocop/rubocop-ast that referenced this pull request Jan 8, 2023
Same as: rubocop/rubocop-rspec#1539

This PR ensures that only the last execution per branch always works, even when pushed multiple times in a row, for example. The older one is canceled.

Refs:
https://docs.github.com/en/actions/using-jobs/using-concurrency https://github.blog/changelog/2021-04-19-github-actions-limit-workflow-run-or-job-concurrency/
Cute0110 added a commit to Cute0110/Rubocop-Performance that referenced this pull request Sep 28, 2023
Same as: rubocop/rubocop-rspec#1539

This PR ensures that only the last execution per branch always works, even when pushed multiple times in a row, for example. The older one is canceled.

Refs:
https://docs.github.com/en/actions/using-jobs/using-concurrency https://github.blog/changelog/2021-04-19-github-actions-limit-workflow-run-or-job-concurrency/
SerhiiMisiura added a commit to SerhiiMisiura/Rubocop-Performance that referenced this pull request Oct 5, 2023
Same as: rubocop/rubocop-rspec#1539

This PR ensures that only the last execution per branch always works, even when pushed multiple times in a row, for example. The older one is canceled.

Refs:
https://docs.github.com/en/actions/using-jobs/using-concurrency https://github.blog/changelog/2021-04-19-github-actions-limit-workflow-run-or-job-concurrency/
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