8000 Possibly replace use of `styfle/cancel-workflow-action` with `cancel-in-progress` · Issue #115 · shadow/tornettools · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

Possibly replace use of styfle/cancel-workflow-action with cancel-in-progress #115

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

Open
stevenengler opened this issue Feb 24, 2025 · 1 comment

Comments

@stevenengler
Copy link
Contributor

We have a github CI workflow to cancel a previously run 'run-all-steps' workflow. We use the third-party styfle/cancel-workflow-action action with actions: write permissions for this. But since then github has added a cancel-in-progress workflow option. We should possibly switch to this instead if it serves the same purpose.

https://docs.github.com/en/actions/writing-workflows/choosing-what-your-workflow-does/control-the-concurrency-of-workflows-and-jobs

# Since the run_all_steps workflow is relatively expensive, only allow one
# instance to run at once per branch, canceling obsolete runs.
#
# Based on https://github.com/styfle/cancel-workflow-action#advanced-pull-requests-from-forks
#
# TODO: should we replace this with 'cancel-in-progress'?
# https://docs.github.com/en/actions/writing-workflows/choosing-what-your-workflow-does/control-the-concurrency-of-workflows-and-jobs
name: Cancel previous run-all-steps

@sporksmith
Copy link
Contributor
sporksmith commented Feb 24, 2025

Nice - yeah I think this is what we want

For example, you can use the concurrency keyword immediately after where trigger conditions are defined to limit the concurrency of entire workflow runs for a specific branch:

concurrency:
  group: ${{ github.workflow }}-${{ github.ref }}
  cancel-in-progress: true

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

No branches or pull requests

2 participants
0