Skip to content

Allow triggering the Docker build manually - #58

Merged
kurowski merged 1 commit into
mainfrom
50-manual-docker-build
Aug 17, 2026
Merged

Allow triggering the Docker build manually#58
kurowski merged 1 commit into
mainfrom
50-manual-docker-build

Conversation

@kurowski

Copy link
Copy Markdown
Member

Closes #50

Adds workflow_dispatch to the Docker workflow so the image can be rebuilt on demand — for a security update, or just to republish without pushing an empty commit.

Behavior

  • Picking the ref. The "Run workflow" dialog lets you choose the branch. type=ref,event=branch in the metadata step covers workflow_dispatch, so a manual run on main publishes ghcr.io/uceap/devcontainer-drupal:main exactly like a push does — that's the tag downstream projects consume, so this covers @shaundrong's case of wanting the real image instead of a branch image.
  • no_cache input. cache-from: type=gha would otherwise replay the cached base image and apt-get layers, which is precisely what a security rebuild is meant to discard. Checking the box sets no-cache and pull on the build step so the base image is re-pulled and package installs re-run.

Defaults to false, and inputs.no_cache is empty outside workflow_dispatch, so == true renders as literal false — scheduled, push, and PR builds are unchanged.

Testing

  • YAML parses; all four triggers and both expressions resolve as intended.
  • actionlint is clean on the changed lines.
  • Merging this makes the trigger available on main; a manual run with Build without cache checked is the real end-to-end check.

Left alone

actionlint flags two pre-existing issues this PR doesn't touch — actions/checkout@v3 is on a runner GitHub no longer supports, and the cosign step has an unquoted ${DIGEST} (SC2086). Happy to fix either here or separately.

🤖 Generated with Claude Code

Adds workflow_dispatch so the image can be rebuilt on demand instead of
waiting for the weekly schedule or pushing an empty commit. Running it on
a branch tags the image after that branch, same as a push.

Includes a no_cache input: cache-from: type=gha would otherwise replay the
cached base image and package-install layers, which is exactly what a
security rebuild needs to discard. Defaults to false, so scheduled, push,
and pull_request builds are unchanged.

Closes #50

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
@kurowski
kurowski requested a review from shaundrong August 14, 2026 19:42
@kurowski
kurowski merged commit fcc6adb into main Aug 17, 2026
1 check passed
@kurowski
kurowski deleted the 50-manual-docker-build branch August 17, 2026 17:20
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.

allow triggering build manually

2 participants