Skip to content

Use native concurrency in AutoCancelInProgressWorkflow - #216

Merged
timtebeek merged 1 commit into
mainfrom
tim/github-actions-issue-60
Aug 22, 2026
Merged

Use native concurrency in AutoCancelInProgressWorkflow#216
timtebeek merged 1 commit into
mainfrom
tim/github-actions-issue-60

Conversation

@timtebeek

@timtebeek timtebeek commented Aug 22, 2026

Copy link
Copy Markdown
Member

Fixes #60

styfle/cancel-workflow-action opens its README with "You probably do not need to install this custom action", pointing at the native concurrency property instead. AutoCancelInProgressWorkflow now produces that form:

concurrency:
  group: ${{ github.workflow }}-${{ github.ref }}
  cancel-in-progress: ${{ github.ref != 'refs/heads/main' }}

inserted before jobs:, leaving any existing concurrency block untouched.

The accessToken option is dropped, as no token is needed for native cancellation.

`styfle/cancel-workflow-action` recommends the native `concurrency`
property instead of installing that action, so add that block rather
than a pinned five-year-old third party action. Drops the now obsolete
`accessToken` option.

Fixes #60
@timtebeek
timtebeek force-pushed the tim/github-actions-issue-60 branch from d62ae41 to f658fa6 Compare August 22, 2026 14:40
@timtebeek timtebeek changed the title Prefer native concurrency over styfle/cancel-workflow-action Use native concurrency in AutoCancelInProgressWorkflow Aug 22, 2026
@timtebeek
timtebeek merged commit 6ebc968 into main Aug 22, 2026
1 check passed
@timtebeek
timtebeek deleted the tim/github-actions-issue-60 branch August 22, 2026 15:30
@github-project-automation github-project-automation Bot moved this from In Progress to Done in OpenRewrite Aug 22, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

Rewrite AutoCancelInProgressWorkflow to use built in cancellation

1 participant