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

build: use deploy key to release #34

Merged
merged 1 commit into from
Oct 21, 2024

Conversation

sbellone
Copy link
Collaborator

GitHub introduced rulesets last year, a new way to protect branches.

More recently, rulesets now permit to add a Deploy key to the bypass list (doc).

This permits to store the private SSH key of the Deploy key in a secret, and checkout the repository using this key.
After that, the Action can now push on protected branches.

Changes

  • Make the Action checkout the repo using the DEPLOY_KEY secret.

I've already done the following on the repo:

  • Created a deploy key with write permissions
  • Saved the private SSH key in a DEPLOY_KEY secret
  • Replaced the legacy branch protections by some rulesets, with Deploy keys added to the bypass list. You can view them here.

Test

At next release.
I've also tested it on a test repo: https://github.com/sbellone/release-workflow-example


SFCC-384

@sbellone sbellone requested a review from htuzel October 15, 2024 17:52
@sbellone sbellone self-assigned this Oct 15, 2024
@sbellone sbellone merged commit 9100ad4 into develop Oct 21, 2024
2 checks passed
@sbellone sbellone deleted the chore/use-deploy-key-to-release branch October 21, 2024 09:41
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