Skip to content

release workflow needs the workflows permission#59

Merged
derekmisler merged 1 commit intodocker:mainfrom
derekmisler:release-workflow-needs-this-workflow-permission
Feb 26, 2026
Merged

release workflow needs the workflows permission#59
derekmisler merged 1 commit intodocker:mainfrom
derekmisler:release-workflow-needs-this-workflow-permission

Conversation

@derekmisler
Copy link
Contributor

@derekmisler derekmisler commented Feb 26, 2026

Summary

The release workflow was failing because it requires a Personal Access Token (PAT) with the workflows permission to push changes back to the repository. This PR replaces the default github.token with a RELEASE_TOKEN secret in two places within the release workflow, and bumps CAGENT_VERSION to v1.27.1.

Changes

  • .github/workflows/release.yml: Passes secrets.RELEASE_TOKEN as the token for the actions/checkout step (enabling authenticated pushes with the necessary workflows permission) and replaces github.token with secrets.RELEASE_TOKEN for the gh release create step.
  • CAGENT_VERSION: Bumped from v1.27.0 to v1.27.1.

How to Test

  • Trigger the release workflow and confirm it completes without permission errors when pushing back to the repository or creating a GitHub Release.
  • Verify the RELEASE_TOKEN secret is configured in the repository settings with the workflows scope before running.

@derekmisler derekmisler force-pushed the release-workflow-needs-this-workflow-permission branch 2 times, most recently from ac1fdea to 63154b8 Compare February 26, 2026 17:39
@derekmisler
Copy link
Contributor Author

/review

@derekmisler derekmisler marked this pull request as ready for review February 26, 2026 17:40
@derekmisler derekmisler requested a review from a team as a code owner February 26, 2026 17:40
@derekmisler derekmisler force-pushed the release-workflow-needs-this-workflow-permission branch from 63154b8 to 490205e Compare February 26, 2026 17:41
Copy link

@docker-agent docker-agent bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Review Summary

Looks good! The changes properly address the GitHub security requirement for the workflows write permission. The code correctly references secrets.RELEASE_TOKEN in both the checkout action and the gh release create command. The implementation is syntactically correct and follows GitHub Actions best practices.

Note: Ensure that the RELEASE_TOKEN secret is configured in the repository settings with the appropriate permissions (contents: write and workflows: write) before merging.

@derekmisler
Copy link
Contributor Author

/describe

@docker-agent
Copy link

docker-agent bot commented Feb 26, 2026

✅ PR description has been generated and updated!

Copy link

@docker-agent docker-agent bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Review Summary

This PR correctly switches from github.token to secrets.RELEASE_TOKEN to gain the workflows: write permission required by GitHub's push protection when creating releases that modify workflow files.

All code changes are appropriate for the stated purpose. No bugs found in the changed code.

Signed-off-by: Derek Misler <derek.misler@docker.com>
@derekmisler derekmisler force-pushed the release-workflow-needs-this-workflow-permission branch from 490205e to e31083a Compare February 26, 2026 17:45
@derekmisler derekmisler merged commit 66ae5de into docker:main Feb 26, 2026
8 checks passed
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