Skip to content

ci: use deploy key for semantic-release#55

Merged
ian-flores merged 1 commit intomainfrom
ci-use-deploy-key-for-releases
Jan 27, 2026
Merged

ci: use deploy key for semantic-release#55
ian-flores merged 1 commit intomainfrom
ci-use-deploy-key-for-releases

Conversation

@ian-flores
Copy link
Contributor

Summary

Switch from GITHUB_TOKEN to a deploy key for git operations in the release workflow.

Why

This allows semantic-release to push release commits and tags to main while respecting branch protection rules. The deploy key (semantic-release-team-operator) is configured as a bypass actor in the new main-protection ruleset.

Changes

  • Replace persist-credentials: false with ssh-key: ${{ secrets.DEPLOY_KEY }} in checkout step

Setup completed

  • Deploy key created and added to repo
  • Private key stored as DEPLOY_KEY secret
  • Ruleset created with deploy key bypass

Test plan

  • Merge this PR
  • Verify next release workflow completes successfully

Switch from GITHUB_TOKEN to a deploy key for git operations in the
release workflow. This allows semantic-release to push release commits
and tags while respecting branch protection rules via ruleset bypass.
@claude
Copy link

claude bot commented Jan 27, 2026

Claude finished @ian-flores's task —— View job


Reviewing PR

  • Read review guidelines
  • Create pending review
  • Get PR diff and analyze changes
  • Add inline comments if needed
  • Submit review

Review submitted. The change follows established patterns for enabling automated releases with branch protection via deploy keys.

@ian-flores ian-flores marked this pull request as ready for review January 27, 2026 03:43
Copy link

@claude claude bot left a comment

Choose a reason for hiding this comment

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

Security Review (Credential Handling)

This change switches from persist-credentials: false to using a deploy key for git operations in the release workflow. This is a common pattern for semantic-release to push commits and tags when branch protection is enabled.

Reviewed:

  • ✅ Deploy key stored as a secret (not hardcoded)
  • ✅ Uses SSH key authentication rather than embedding tokens
  • ✅ PR description confirms ruleset bypass is properly configured
  • GITHUB_TOKEN is still used for GitHub API operations (line 68), which is appropriate

Observation:
The package-helm job (line 71) still uses the default checkout without SSH key, but this is correct since it only reads from the repo and doesn't need push access.

LGTM - the change follows established patterns for enabling automated releases with branch protection.

@ian-flores ian-flores requested review from amdove and statik January 27, 2026 03:44
@ian-flores ian-flores merged commit 2e1204b into main Jan 27, 2026
3 checks passed
@ian-flores ian-flores deleted the ci-use-deploy-key-for-releases branch January 27, 2026 04:29
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