This is an automated email from the ASF dual-hosted git repository.
RocMarshal pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/flink-docker.git
The following commit(s) were added to refs/heads/master by this push:
new 2a96d70 [FLINK-39796] Fix snapshot bake by pinning bake-action to
local source (#261)
2a96d70 is described below
commit 2a96d709e8834e323d230fbeddf4495c2ad26d03
Author: Hao Li <[email protected]>
AuthorDate: Sun May 31 00:06:47 2026 -0700
[FLINK-39796] Fix snapshot bake by pinning bake-action to local source
(#261)
bake-action v7 changed the default of an unset `source` input: it now
falls back to the workflow's git context and bakes it as a remote ref,
so buildx fetches docker-bake.hcl and the build context from the
triggering commit on master.
That breaks the snapshot workflow for two reasons:
1. master's docker-bake.hcl lacks the `target "docker-metadata-action" {}`
stub that every dev-* branch defines, so `inherits` fails with
`failed to find target docker-metadata-action`.
2. the snapshot Dockerfile is generated at runtime by add-custom.sh into
the local working tree and is not committed, so a remote bake context
could not find it anyway.
Setting `source: .` restores the pre-v7 behavior of baking the local
working tree (the checked-out dev-* branch), which has both the generated
Dockerfile and the docker-metadata-action stub.
---
.github/workflows/snapshot.yml | 8 ++++++++
1 file changed, 8 insertions(+)
diff --git a/.github/workflows/snapshot.yml b/.github/workflows/snapshot.yml
index 604ab1b..be1cf8d 100644
--- a/.github/workflows/snapshot.yml
+++ b/.github/workflows/snapshot.yml
@@ -79,6 +79,14 @@ jobs:
- name: "Build and push Docker images (supported platforms)"
uses: docker/bake-action@6614cfa25eff9a0b2b2697efb0b6159e7680d584
with:
+ # bake-action >= v7 defaults an unset "source" to the workflow's git
+ # context and bakes it as a remote ref, which reads docker-bake.hcl
and
+ # the build context from the triggering commit on master. This
workflow
+ # needs the local working tree instead: the Dockerfile is generated
at
+ # runtime by add-custom.sh, and the docker-metadata-action target it
+ # inherits is only defined in the checked-out dev-* branch. Pin to
the
+ # local source to restore the pre-v7 behavior.
+ source: .
files: |
.github/workflows/docker-bake.hcl
${{ steps.meta.outputs.bake-file }}