Skip to content

fix(ci): trigger rpm.yml on release:published instead of push:tags#84

Merged
shigechika merged 3 commits into
mainfrom
fix/rpm-gh-repo-env
May 8, 2026
Merged

fix(ci): trigger rpm.yml on release:published instead of push:tags#84
shigechika merged 3 commits into
mainfrom
fix/rpm-gh-repo-env

Conversation

@shigechika
Copy link
Copy Markdown
Owner

@shigechika shigechika commented May 8, 2026

Problem

push: tags fires before release-please creates the GitHub Release. Inside the rockylinux:9 container, gh can't discover the repository via git, so gh release view always fails — even when the release already exists. After 30 iterations the wait-loop times out, the fallback gh release create runs, and fails with HTTP 422 because the release was created in the meantime.

Previous fix attempts (#82) only patched individual gh calls but missed the architectural issue: the trigger itself fires too early.

Fix

Switch to release: published — the same pattern already used by release.yml (which has a comment explaining exactly this problem). The release is guaranteed to exist when the workflow fires, so the entire wait-and-fallback step can be removed.

workflow_dispatch still works for build testing; the upload step is gated on github.event_name == 'release' so it is skipped for manual runs.

Changes

  • Trigger: push: tagsrelease: published
  • Remove "Wait for GitHub Release to exist" step (21 lines gone)
  • Upload step: add if: github.event_name == 'release' condition
  • Keep GH_REPO env var as safety net for remaining gh call

🤖 Generated with Claude Code

shigechika and others added 2 commits May 8, 2026 16:55
…tainer

In the rockylinux:9 container, gh cannot discover the repository via git
(no git remote context), causing gh release view to always fail. Setting
GH_REPO at the job level makes all gh commands resolve the repo without
needing git.

Co-Authored-By: Claude Sonnet 4.6 <[email protected]>
The push:tags trigger fires before release-please creates the GitHub
Release, so the wait-loop always times out in the rockylinux:9 container
(gh cannot discover the repo via git, so gh release view always fails).

Switch to release:published — same pattern as release.yml — so the
release is guaranteed to exist when the workflow runs. Remove the
wait-and-fallback step entirely.

Co-Authored-By: Claude Sonnet 4.6 <[email protected]>
@shigechika shigechika changed the title fix(ci): set GH_REPO env at job level in rpm.yml to fix gh CLI in container fix(ci): trigger rpm.yml on release:published instead of push:tags May 8, 2026
@shigechika shigechika merged commit 2913be8 into main May 8, 2026
2 checks passed
@shigechika shigechika deleted the fix/rpm-gh-repo-env branch May 8, 2026 08:10
shigechika added a commit that referenced this pull request May 8, 2026
Same fix as rpm.yml (#84): switch from push:tags to release:published
so the GitHub Release is guaranteed to exist when the workflow fires.
Remove the wait-and-fallback step (21 lines).

Co-authored-by: Claude Sonnet 4.6 <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant