Skip to content

Fix checkout ref for build workflow call#612

Open
dfangl wants to merge 1 commit into
factoriotools:masterfrom
dfangl:ci/fix-build-checkout-ref
Open

Fix checkout ref for build workflow call#612
dfangl wants to merge 1 commit into
factoriotools:masterfrom
dfangl:ci/fix-build-checkout-ref

Conversation

@dfangl
Copy link
Copy Markdown

@dfangl dfangl commented May 22, 2026

Motivation

With #611, the build trigger was changed to a workflow_call, if the update action finds an update and pushes a commit.

However, this approach has a flaw, mainly that the build action will checkout the commit based on the event that triggered the workflow in the first place - so now the parent of the commit pushed.

This leads to the repo being in the correct state, but the workflow picking up the previous one and not pushing the correct image.

We can see that in this workflow run, the previous commit was checked out:

https://github.com/factoriotools/factorio-docker/actions/runs/26247031594/job/77247980413#step:2:65

This is also documented in https://github.com/actions/checkout:

The branch, tag or SHA to checkout. When checking out the repository that
triggered a workflow, this defaults to the reference or SHA for that event.
Otherwise, uses the default branch.

Changes

  • Change the checkout ref for the build call to ${{ github.ref_name }} - this should be, on the schedule action, the default branch (here master). This way we should get the latest commit (since it is already pushed to master).
  • Update the setup-qemu-action: The current version uses node20, which is deprecated

…atest version of the main branch after commit
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