fix: trigger docker-build workflow after update.yml pushes via GITHUB_TOKEN#610
Open
carlbennett wants to merge 1 commit intofactoriotools:masterfrom
Open
Conversation
…e.yml GITHUB_TOKEN pushes do not trigger downstream workflows, so docker-build.yml never fires after update.yml commits a new version. Add a workflow_run trigger so docker-build runs after Check Update completes. A change-detection step skips the build when triggered via workflow_run but buildinfo.json was not modified, avoiding spurious builds on every hourly run. References factoriotools#604 Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
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.
Problem
The
docker-build.ymlworkflow triggers onpushtomasterwhenbuildinfo.jsonchanges, but the push is made byupdate.ymlusingGITHUB_TOKEN. GitHub intentionally does not trigger downstream workflows fromGITHUB_TOKENpushes to prevent infinite loops — sodocker-build.ymlnever fires automatically.This is the root cause of Docker Hub being stuck at 2.0.73 while the repo and Factorio.com are at 2.0.76. See also #526, which added
workflow_dispatchas a partial workaround.Fix
Add a
workflow_runtrigger todocker-build.ymlthat fires afterCheck Updatecompletes. This bypasses theGITHUB_TOKENpush limitation.To avoid a spurious build on every hourly run (when there's no new version), a change-detection step checks whether
buildinfo.jsonwas actually modified in the last commit. The expensive steps (QEMU setup, build & push) are skipped when triggered viaworkflow_runbut no change was detected.The existing
pushandworkflow_dispatchtriggers are preserved and unaffected.References
References #604
🤖 Generated with Claude Code