Skip to content

fix: explicitly trigger release.yml since GITHUB_TOKEN pushes can't - #4

Merged
veniplex merged 1 commit into
mainfrom
ci/trigger-release-on-tag
Jul 13, 2026
Merged

veniplex merged 1 commit into
mainfrom
ci/trigger-release-on-tag

Conversation

@veniplex

Copy link
Copy Markdown
Owner

Summary

After #3 merged, version-bump.yml ran successfully — package.json was bumped to 1.0.2, the commit and v1.0.2 tag were pushed, and a GitHub Release was created — but no Docker image was published for it.

Root cause: version-bump.yml pushes its release commit and tag using the default GITHUB_TOKEN. GitHub explicitly suppresses push-triggered workflow runs for GITHUB_TOKEN-authored pushes (anti-recursion protection). Confirmed via the Actions run history: release.yml only ran 3 times total, exactly matching the 3 real PR merges (#1, #2, #3) via the GitHub merge button — never for the chore(release) commit or the v1.0.2 tag pushed by the bot.

Fix: workflow_dispatch calls ARE exempt from that restriction. So:

  • release.yml gains a workflow_dispatch: trigger.
  • version-bump.yml's last step now runs gh workflow run release.yml --ref "vX.Y.Z" right after pushing the tag, explicitly kicking off the image build against that tag ref (so docker/metadata-action's semver tag derivation still works exactly as it does for a real tag push).
  • permissions.actions: write added so the bot token is allowed to dispatch the workflow.

Docs updated to reflect the explicit-dispatch step.

Test plan

  • YAML validated for both workflow files.
  • Merge this PR and confirm: version-bump.yml bumps to 1.0.3, tags v1.0.3, and its "Trigger Docker image build" step succeeds — then confirm a release.yml run actually appears (triggered by workflow_dispatch) and publishes ghcr.io/veniplex/study-helper:1.0.3, :1.0, :1, :latest.

Generated by Claude Code

version-bump.yml pushes its release commit and vX.Y.Z tag using the
default GITHUB_TOKEN. GitHub suppresses push-triggered workflow runs for
GITHUB_TOKEN-authored pushes (anti-recursion protection), so release.yml
never actually ran for those pushes even though the version bump, tag,
and GitHub Release all succeeded — confirmed via the Actions run history
after PR #3 merged (0.0.0 release.yml runs for the tag, only for real
PR-merge commits).

workflow_dispatch calls are exempt from that restriction, so
version-bump.yml now explicitly runs `gh workflow run release.yml --ref
vX.Y.Z` as its last step, and release.yml gained a workflow_dispatch
trigger to accept it.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01ST7p7inT3agkLEp8qbPSC6
@veniplex
veniplex merged commit d8acf34 into main Jul 13, 2026
2 checks passed
@veniplex
veniplex deleted the ci/trigger-release-on-tag branch July 13, 2026 12:24
github-actions Bot added a commit that referenced this pull request Jul 13, 2026
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.

2 participants