Repository navigation
Rebuild every image weekly - #12
Merged
Merged
Conversation
Images were only rebuilt when a Dockerfile changed or the workflow was run by hand, so a new php.net patch release in the official php or dunglas/frankenphp images, or an Alpine package fix, never reached the tags on its own. Add a Monday 10:00 UTC schedule. A scheduled run builds every image (each build condition now also checks github.event_name == 'schedule', since workflow_dispatch inputs are empty then) without the layer cache, which would otherwise keep last week's packages whenever the base image is unchanged. Every build step pulls its base image. The README notes the rebuild, including that it refreshes the current commit's -<sha> tags.
On a scheduled run the current commit's -<sha> parent tags already exist from an earlier run, so the build-contexts pin no longer catches a parent that failed in this run: the dependent and wordpress-dev images would rebuild and republish on last week's parent. Run each child and merge job only when the job it depends on succeeded. Also skip the EOL 7.4-8.1 cli images on schedule (their Alpine branches get no updates), drop pull: true (the docker-container builder resolves base images from the registry anyway), and say in the README and the workflow comment that frankenphp images stay on their pinned FrankenPHP version.
Member
Author
Review round 1 (single round)A reviewer with fresh context checked this PR with Confirmed holds
Findings
|
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.
Summary
Images were only rebuilt when a Dockerfile changed or someone ran the workflow by hand. New php.net patch releases (through the official
phpanddunglas/frankenphpbase images) and Alpine package fixes never reached the tags on their own. #11 moved the CLI images to the official images, so this matters for them too.Changes to
.github/workflows/build-and-push.yml:scheduletrigger, Mondays 10:00 UTC (Monday 3:00 a.m. Arizona time).github.event_name == 'schedule'next toinputs.force_build_all. Scheduled runs have noworkflow_dispatchinputs and no changed files, so otherwise nothing would build.no-cache: ${{ github.event_name == 'schedule' }}on every build step. With the cache, an unchanged base image would reuse last week'sapk add/install-php-extensionslayers and keep old Alpine packages. Scheduled runs still write to the cache for later push builds.-<sha>parent tags already exist from an earlier run, so a failed parent would otherwise leave its children rebuilt on last week's image. This is deliberately conservative: one version's failure also holds back the other versions' children for that run.eol: truein the matrix) are on Alpine branches that get no updates, so a weekly rebuild would only re-push identical images.README: says which images rebuild weekly. The FrankenPHP images stay on their pinned FrankenPHP version: upstream only rebuilds its latest release, so after a new FrankenPHP release, PHP patches there still need
FRANKENPHP_VERSIONbumped by hand. It also says the rebuild refreshes the current commit's-<sha>tags, so a byte-for-byte fixed image needs a digest pin.Things to know
force_build_allrun, plus extra time for the empty cache.cancel-in-progressconcurrency group also covers scheduled runs.force_build_all. Keeping push and scheduled runs in separate groups would let an older scheduled run overwrite a newer push's images, which is worse.Test plan
main.force_build_allto confirm a full build still works. The first scheduled run is the following Monday; I'll check that it builds every image without the cache.