Repository navigation
ci: fix tagpr release triggers and container publishing - #190
Merged
Merged
Conversation
Codex Review Summary: ✅ CompletedThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
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.
Problems found
GITHUB_TOKEN-created tags do not trigger separateon.push.tagsworkflows, so tagpr releases skippedbuild-container-image.yamland would leave GHCR container images andlateststale.tagpr.ymllackedpull_request(labeled/unlabeled) andworkflow_dispatchtriggers, so addingtagpr:minoron PR Release for v1.3.0 #186 did not refresh the proposed version (v1.2.1->v1.3.0).tagpr.ymllackedconcurrency, allowing back-to-back pushes tomainto race ontagpr-from-*or tag creation.tagpr.ymlinstead of reusingrelease-golang.yamlwith scoped job permissions, and neither release workflow supported an explicittaginput for manual recovery.Changes
.github/workflows/tagpr.yml:pull_request(labeled/unlabeled) filtered to open same-repotagpr-from-*PRs withtagpr:/tagpr/labels, plusworkflow_dispatch.concurrency(group: tagpr,cancel-in-progress: false).ref: mainsotagprdoes not fail on detached HEAD duringpull_requestevents.release-go->release-golang.yaml,release-container->build-container-image.yaml) gated onneeds.tagpr.outputs.tag != '' && github.event_name != 'pull_request'and least-privilege job permissions..github/workflows/release-golang.yaml:workflow_call(requiredtaginput) andworkflow_dispatchoptionaltaginput with tag format validation and checkoutref..github/workflows/build-container-image.yaml:workflow_call(requiredtaginput) andworkflow_dispatchoptionaltaginput, resolved release tag/ref/push/attestation context uniformly for tag pushes and explicitinputs.tag, tightened permissions (contents: read,id-token: write,packages: write,attestations: write), and increasedtimeout-minutesto20.Verification
mise x actionlint@1.7.12 shellcheck@0.11.0 -- actionlint .github/workflows/tagpr.yml .github/workflows/release-golang.yaml .github/workflows/build-container-image.yaml: passed with no errors or warnings.goreleaser check: passed (1 configuration file(s) validated).Operational notes
main,Tag and releasewill run and pick up thetagpr:minorlabel already on PR Release for v1.3.0 #186, updating it tov1.3.0.GITHUB_TOKENis used,ci-golangon bot-created tagpr PRs still requires clicking "Approve and run" (switching to a GitHub App token viaactions/create-github-app-tokenis an optional future improvement if automatic PR CI runs are desired).