Add standalone last-deploy tag workflow - #114
Open
Raj Pawar(SRE/DevOps) (rajpawar02) wants to merge 2 commits into
Open
Add standalone last-deploy tag workflow#114Raj Pawar(SRE/DevOps) (rajpawar02) wants to merge 2 commits into
Raj Pawar(SRE/DevOps) (rajpawar02) wants to merge 2 commits into
Conversation
Reproduces the SRE-3491 last-deploy-<env> tagging mechanism as a standalone workflow triggered after 'Release' completes, since caterpillar has no ECS/AWS deployment -- it releases a Go binary + Docker Hub image. Falls back to tagging on the build/release workflow per SRE-3523's "if deployment not there then on build" guidance. Uses GITHUB_TOKEN, not GHA_RUNNER_TOKEN: this repo is public and GHA_RUNNER_TOKEN is an org secret scoped to private/internal repos only. GITHUB_TOKEN + contents:write is sufficient for a same-repo tag push. Part of SRE-3523.
Raj Pawar(SRE/DevOps) (rajpawar02)
requested a review
from a team
as a code owner
September 7, 2026 11:31
Copilot started reviewing on behalf of
Raj Pawar(SRE/DevOps) (rajpawar02)
September 7, 2026 11:32
View session
Contributor
There was a problem hiding this comment.
🟡 Changes recommended
As written, the workflow can move last-deploy-prod for successful non-release main builds because Release also runs on main pushes, so it needs an explicit guard to only retag on actual release tags.
Once you've addressed the issues Copilot identified, you can request another Copilot review.
Pull request overview
Adds a repository-local GitHub Actions workflow to maintain a moving “last deployed” tag, aligning caterpillar with the deploy-tracking mechanism used in other repos while avoiding dependencies on ECS/AWS-specific reusable workflows.
Changes:
- Introduces a new
workflow_run-triggered workflow that runs after theReleaseworkflow completes successfully. - Uses
GITHUB_TOKENwithcontents: writeto force-move thelast-deploy-prodgit tag to the released commit.
File summaries
| File | Description |
|---|---|
| .github/workflows/update-deploy-tag.yml | Adds a workflow that updates the last-deploy-prod tag based on successful Release workflow runs. |
Review details
- Files reviewed: 1/1 changed files
- Comments generated: 1
- Review effort level: Lite
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
Comment on lines
+31
to
+36
| - name: Move last-deploy-prod tag | ||
| run: | | ||
| TAG_NAME="last-deploy-prod" | ||
| echo "Moving ${TAG_NAME} to ${{ github.event.workflow_run.head_sha }}" | ||
| git tag -f "$TAG_NAME" "${{ github.event.workflow_run.head_sha }}" | ||
| git push origin "refs/tags/$TAG_NAME" --force |
PiyushT-pattern
approved these changes
Sep 9, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Part of SRE-3523.
Test plan