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

sha deployments #212

Merged
merged 22 commits into from
Oct 5, 2023
Merged

sha deployments #212

merged 22 commits into from
Oct 5, 2023

Conversation

GrantBirki
Copy link
Member

@GrantBirki GrantBirki commented Oct 4, 2023

SHA Deployments

This pull request enables users of this Action to target specific SHAs for deployment. The most common use case for this is "rollback" deployments.

You can now run .deploy <sha> to <environment>

Where <sha> is either a full sha1 or sha256 hash

Example:

.deploy b69ba12504020c9067abe680c1dc28191d4c9be3

or

.deploy b69ba12504020c9067abe680c1dc28191d4c9be3 to production

For example, if you have an edge case where your branch deploy failed, and your .deploy main (base branch) failed you may want to revert to a previous commit. You can now do this with .deploy <sha> and the branch-deploy Action will use this as your target sha to be re-deployed.

In order to use this new feature, you must set the following input option:

- uses: github/branch-deploy@vX.X.X
  id: branch-deploy
  with:
    allow_sha_deployments: "true" # <--- this option must be "true"

The reasoning for this is that deploying to a sha can be a dangerous and potentially unsafe option, so it is disabled by default. More details about why this is an issue can be found here


related: #211, #213

@GrantBirki GrantBirki added the enhancement New feature or request label Oct 4, 2023
@GrantBirki GrantBirki self-assigned this Oct 5, 2023
@GrantBirki GrantBirki changed the title sha, branch, or tag deployments sha deployments Oct 5, 2023
@GrantBirki GrantBirki mentioned this pull request Oct 5, 2023
@GrantBirki GrantBirki merged commit 5498c78 into main Oct 5, 2023
4 checks passed
@GrantBirki GrantBirki deleted the sha-branch-or-tag-deployment branch October 5, 2023 21:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant