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

Add Commit Status Verification to deploy-template #20031

Merged
merged 3 commits into from
Dec 30, 2024

Conversation

rjohnson2011
Copy link
Contributor

@rjohnson2011 rjohnson2011 commented Dec 26, 2024

Summary

The workflow prevents deploying failed commits by modifying gitHub.sha to github.event.workflow_run.head_commit.id. See thread for more details.

PR output:

Echo PR before push:
Run echo “github.sha: 17f0c2bc1de44575714094f32492750596ed4e16”
github.sha: 17f0c2bc1de44575714094f32492750596ed4e16
github.event.push.head_commit.id:
github.event.pull_request.merge_commit_sha: 413c1608c7272b1bdaa1c46a38e30adcfff15a01
github.event.head_commit.id:
Echo PR code checks after push:
Run echo “github.sha: 781541c1b366fc5549896ae961bf9d6faeb40b75"
github.sha: 781541c1b366fc5549896ae961bf9d6faeb40b75
github.event.push.head_commit.id:
github.event.pull_request.merge_commit_sha:
github.event.head_commit.id: 781541c1b366fc5549896ae961bf9d6faeb40b75
Echo PR Build gha:
Run echo “github.sha: 07fa20cb5fff56f63f1f981a57ff14ec20d2ace0”
github.sha: 07fa20cb5fff56f63f1f981a57ff14ec20d2ace0
github.event.push.head_commit.id:
github.event.pull_request.merge_commit_sha:
github.event.head_commit.id:
github.event.workflow_run.head_commit.id: 781541c1b366fc5549896ae961bf9d6faeb40b75

Related issue(s)

Github Ticket

.github/workflows/deploy-template.yml Outdated Show resolved Hide resolved
.github/workflows/deploy-template.yml Outdated Show resolved Hide resolved
@RachalCassity
Copy link
Member

I found the error: Build, Push, & Deploy action is rendering the incorrect image tag. I’m digging further.
@Ryan Johnson
The ${{ github.sha }} is incorrect. We need to fix the incorrect github.sha issue. This pull request will not fix the issue.

Copy link
Member

@RachalCassity RachalCassity left a comment

Choose a reason for hiding this comment

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

Please fix the github.sha issue

@rjohnson2011
Copy link
Contributor Author

Please fix the github.sha issue

Made the changes discussed to build.yml and deploy-template.yml

Copy link
Contributor

@LindseySaari LindseySaari left a comment

Choose a reason for hiding this comment

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

@rjohnson2011 Please place the before/after output in the PR description but otherwise looks good!

@rjohnson2011 rjohnson2011 merged commit 2e1b2b6 into master Dec 30, 2024
26 checks passed
@rjohnson2011 rjohnson2011 deleted the prevent-fail-deploys branch December 30, 2024 16:15
derekhouck pushed a commit that referenced this pull request Dec 31, 2024
* Add commit status verification

* github sha to workflow run head commit id

* Change additional instance
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants