Skip to content

fix(ci): skip PR tarball publish on non-PR workflow runs#4

Merged
jpr5 merged 1 commit into
mainfrom
fix/pr-tarball-publish-skip-non-pr
May 15, 2026
Merged

fix(ci): skip PR tarball publish on non-PR workflow runs#4
jpr5 merged 1 commit into
mainfrom
fix/pr-tarball-publish-skip-non-pr

Conversation

@jpr5
Copy link
Copy Markdown

@jpr5 jpr5 commented May 15, 2026

Summary

  • workflow_run also fires on main pushes where there is no PR
  • When pull_requests array is empty, the publish job errors trying to extract a PR number
  • Changed "Get PR number" step to set skip=true and exit 0 when no PR is found
  • Gated all subsequent steps (download, release create, comment) on skip != 'true'

Test plan

  • Push to main triggers PR Tarball (Build), which triggers PR Tarball (Publish) -- publish job should now exit cleanly with all steps skipped
  • PR-based workflow runs continue to work as before (PR number extracted, tarball published, comment posted)

workflow_run fires for both PR and push events. When the triggering
run has no associated PR (e.g. a push to main), the pull_requests
array is empty and the publish step errors. Exit gracefully instead,
gating all subsequent steps on the skip output.
@jpr5 jpr5 merged commit 1936b52 into main May 15, 2026
12 of 13 checks passed
@github-actions github-actions Bot added the size/xs PR size: XS label May 15, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size/xs PR size: XS

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant