Repository navigation
fix(check-upstream): fix startup_failure and idempotent open-pr - #5
Open
vivus-ignis wants to merge 1 commit into
Open
vivus-ignis wants to merge 1 commit into
vivus-ignis wants to merge 1 commit into
Conversation
…-pr idempotent 1. Add contents:write to the build job permissions block — required by the release job in build-envoy-fips.yml (which declared permissions: contents: write). GitHub validates this at startup; the missing permission caused startup_failure on every scheduled run since the release/SBOM job was introduced. 2. Make open-pr idempotent: detect existing remote branch via git ls-remote, use --force-with-lease, skip gh pr create if PR already exists.
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.
Root cause
The
Check upstreamworkflow was failing withstartup_failuresince thereleasejob was added tobuild-envoy-fips.ymlwithpermissions: contents: write. GitHub validates at startup that all permissions a called reusable workflow's jobs request are a subset of what the caller grants. Thebuildjob incheck-upstream.ymlonly grantedpackages: write, so every scheduled run failed immediately before any job executed.Fix
contents: writeto thebuildjob's permissions block — required by thereleasejob added in the build workflow. Missing permission causedstartup_failureon every scheduled run.open-pridempotent: detect existing remote branch viagit ls-remote, use--force-with-lease, skipgh pr createif PR already exists.Test evidence
Build workflow run on fix branch: https://github.com/gardenlinux/container-envoy/actions/runs/42217390376
Conclusion: success (all jobs passed)