Skip to content

fix: trigger docker-build workflow after update.yml pushes via GITHUB_TOKEN#610

Open
carlbennett wants to merge 1 commit intofactoriotools:masterfrom
carlbennett:feature/fix-docker-build-not-triggered-by-update
Open

fix: trigger docker-build workflow after update.yml pushes via GITHUB_TOKEN#610
carlbennett wants to merge 1 commit intofactoriotools:masterfrom
carlbennett:feature/fix-docker-build-not-triggered-by-update

Conversation

@carlbennett
Copy link

Problem

The docker-build.yml workflow triggers on push to master when buildinfo.json changes, but the push is made by update.yml using GITHUB_TOKEN. GitHub intentionally does not trigger downstream workflows from GITHUB_TOKEN pushes to prevent infinite loops — so docker-build.yml never 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_dispatch as a partial workaround.

Fix

Add a workflow_run trigger to docker-build.yml that fires after Check Update completes. This bypasses the GITHUB_TOKEN push limitation.

To avoid a spurious build on every hourly run (when there's no new version), a change-detection step checks whether buildinfo.json was actually modified in the last commit. The expensive steps (QEMU setup, build & push) are skipped when triggered via workflow_run but no change was detected.

The existing push and workflow_dispatch triggers are preserved and unaffected.

References

References #604

🤖 Generated with Claude Code

…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>
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