Skip to content

Commit 8e5442c

Browse files
authored
Merge pull request #382 from crazy-max/dont-set-cwd-prefix
don't set cwd:// prefix for local bake files
2 parents dbef880 + eda41b7 commit 8e5442c

File tree

4 files changed

+4
-35
lines changed

4 files changed

+4
-35
lines changed

.github/workflows/ci.yml

-26
Original file line numberDiff line numberDiff line change
@@ -455,29 +455,3 @@ jobs:
455455
-
456456
name: Print envs
457457
run: env|sort
458-
459-
bake-cwd:
460-
runs-on: ubuntu-latest
461-
steps:
462-
-
463-
name: Checkout
464-
uses: actions/checkout@v4
465-
-
466-
name: Set up Docker Buildx
467-
uses: docker/setup-buildx-action@v3
468-
with:
469-
version: latest
470-
-
471-
name: Docker meta
472-
id: docker_meta
473-
uses: ./
474-
-
475-
name: Build
476-
uses: docker/bake-action@v4
477-
with:
478-
files: |
479-
./test/docker-bake.hcl
480-
${{ steps.docker_meta.outputs.bake-file-tags }}
481-
${{ steps.docker_meta.outputs.bake-file-labels }}
482-
targets: |
483-
release

dist/index.js

+1-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/index.js.map

+1-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/main.ts

+2-7
Original file line numberDiff line numberDiff line change
@@ -94,22 +94,17 @@ actionsToolkit.run(
9494
setOutput('json', JSON.stringify(jsonOutput));
9595
});
9696

97-
// Specifying local and remote bake files is supported since Buildx 0.12.0.
98-
// Set cwd:// prefix for local bake files to avoid ambiguity with remote
99-
// https://github.com/docker/buildx/pull/1838
100-
const bakeFileCwdPrefix = (await toolkit.buildx.versionSatisfies('>=0.12.0').catch(() => false)) ? 'cwd://' : '';
101-
10297
// Bake files
10398
for (const kind of ['tags', 'labels', 'annotations:' + annotationsLevels]) {
10499
const outputName = kind.split(':')[0];
105100
const bakeFile: string = meta.getBakeFile(kind);
106101
await core.group(`Bake file definition (${outputName})`, async () => {
107102
core.info(fs.readFileSync(bakeFile, 'utf8'));
108-
setOutput(`bake-file-${outputName}`, `${bakeFileCwdPrefix}${bakeFile}`);
103+
setOutput(`bake-file-${outputName}`, bakeFile);
109104
});
110105
}
111106

112107
// Bake file with tags and labels
113-
setOutput(`bake-file`, `${bakeFileCwdPrefix}${meta.getBakeFileTagsLabels()}`);
108+
setOutput(`bake-file`, `${meta.getBakeFileTagsLabels()}`);
114109
}
115110
);

0 commit comments

Comments
 (0)