Merge pull request #382 from crazy-max/dont-set-cwd-prefix
Some checks failed
ci / multi-images (push) Successful in 48s
ci / tag-schedule () (push) Successful in 48s
ci / tag-schedule (cron-{{date 'YYYYMMDD'}}) (push) Successful in 48s
ci / tag-schedule (schedule) (push) Successful in 48s
ci / tag-schedule ({{date 'YYYYMMDD-HHmmss'}}) (push) Successful in 48s
ci / tag-match (\d.\d, 0) (push) Successful in 48s
ci / tag-match (\d.\d.\d, 0) (push) Successful in 47s
ci / tag-match (v(.*), 1) (push) Successful in 1m3s
ci / tag-semver (false) (push) Successful in 1m1s
ci / tag-semver (auto) (push) Successful in 1m3s
ci / tag-semver (true) (push) Successful in 1m1s
ci / docker-push (push) Failing after 1s
ci / flavor (push) Successful in 1m5s
ci / custom-labels-annotations (push) Successful in 1m1s
ci / images (push) Successful in 1m4s
ci / global-exps (push) Successful in 38s
ci / json (push) Successful in 33s
ci / no-images (push) Successful in 32s
ci / sep-tags ( ) (push) Failing after 6m37s
ci / sep-tags (,) (push) Successful in 6m42s
ci / bake (push) Failing after 7m15s
ci / bake-annotations (push) Failing after 7m8s
ci / output-env (push) Failing after 7m15s
Some checks failed
ci / multi-images (push) Successful in 48s
ci / tag-schedule () (push) Successful in 48s
ci / tag-schedule (cron-{{date 'YYYYMMDD'}}) (push) Successful in 48s
ci / tag-schedule (schedule) (push) Successful in 48s
ci / tag-schedule ({{date 'YYYYMMDD-HHmmss'}}) (push) Successful in 48s
ci / tag-match (\d.\d, 0) (push) Successful in 48s
ci / tag-match (\d.\d.\d, 0) (push) Successful in 47s
ci / tag-match (v(.*), 1) (push) Successful in 1m3s
ci / tag-semver (false) (push) Successful in 1m1s
ci / tag-semver (auto) (push) Successful in 1m3s
ci / tag-semver (true) (push) Successful in 1m1s
ci / docker-push (push) Failing after 1s
ci / flavor (push) Successful in 1m5s
ci / custom-labels-annotations (push) Successful in 1m1s
ci / images (push) Successful in 1m4s
ci / global-exps (push) Successful in 38s
ci / json (push) Successful in 33s
ci / no-images (push) Successful in 32s
ci / sep-tags ( ) (push) Failing after 6m37s
ci / sep-tags (,) (push) Successful in 6m42s
ci / bake (push) Failing after 7m15s
ci / bake-annotations (push) Failing after 7m8s
ci / output-env (push) Failing after 7m15s
don't set cwd:// prefix for local bake files
This commit is contained in:
commit
8e5442c4ef
26
.github/workflows/ci.yml
vendored
26
.github/workflows/ci.yml
vendored
@ -455,29 +455,3 @@ jobs:
|
|||||||
-
|
-
|
||||||
name: Print envs
|
name: Print envs
|
||||||
run: env|sort
|
run: env|sort
|
||||||
|
|
||||||
bake-cwd:
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
steps:
|
|
||||||
-
|
|
||||||
name: Checkout
|
|
||||||
uses: actions/checkout@v4
|
|
||||||
-
|
|
||||||
name: Set up Docker Buildx
|
|
||||||
uses: docker/setup-buildx-action@v3
|
|
||||||
with:
|
|
||||||
version: latest
|
|
||||||
-
|
|
||||||
name: Docker meta
|
|
||||||
id: docker_meta
|
|
||||||
uses: ./
|
|
||||||
-
|
|
||||||
name: Build
|
|
||||||
uses: docker/bake-action@v4
|
|
||||||
with:
|
|
||||||
files: |
|
|
||||||
./test/docker-bake.hcl
|
|
||||||
${{ steps.docker_meta.outputs.bake-file-tags }}
|
|
||||||
${{ steps.docker_meta.outputs.bake-file-labels }}
|
|
||||||
targets: |
|
|
||||||
release
|
|
||||||
|
2
dist/index.js
generated
vendored
2
dist/index.js
generated
vendored
File diff suppressed because one or more lines are too long
2
dist/index.js.map
generated
vendored
2
dist/index.js.map
generated
vendored
File diff suppressed because one or more lines are too long
@ -94,22 +94,17 @@ actionsToolkit.run(
|
|||||||
setOutput('json', JSON.stringify(jsonOutput));
|
setOutput('json', JSON.stringify(jsonOutput));
|
||||||
});
|
});
|
||||||
|
|
||||||
// Specifying local and remote bake files is supported since Buildx 0.12.0.
|
|
||||||
// Set cwd:// prefix for local bake files to avoid ambiguity with remote
|
|
||||||
// https://github.com/docker/buildx/pull/1838
|
|
||||||
const bakeFileCwdPrefix = (await toolkit.buildx.versionSatisfies('>=0.12.0').catch(() => false)) ? 'cwd://' : '';
|
|
||||||
|
|
||||||
// Bake files
|
// Bake files
|
||||||
for (const kind of ['tags', 'labels', 'annotations:' + annotationsLevels]) {
|
for (const kind of ['tags', 'labels', 'annotations:' + annotationsLevels]) {
|
||||||
const outputName = kind.split(':')[0];
|
const outputName = kind.split(':')[0];
|
||||||
const bakeFile: string = meta.getBakeFile(kind);
|
const bakeFile: string = meta.getBakeFile(kind);
|
||||||
await core.group(`Bake file definition (${outputName})`, async () => {
|
await core.group(`Bake file definition (${outputName})`, async () => {
|
||||||
core.info(fs.readFileSync(bakeFile, 'utf8'));
|
core.info(fs.readFileSync(bakeFile, 'utf8'));
|
||||||
setOutput(`bake-file-${outputName}`, `${bakeFileCwdPrefix}${bakeFile}`);
|
setOutput(`bake-file-${outputName}`, bakeFile);
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
// Bake file with tags and labels
|
// Bake file with tags and labels
|
||||||
setOutput(`bake-file`, `${bakeFileCwdPrefix}${meta.getBakeFileTagsLabels()}`);
|
setOutput(`bake-file`, `${meta.getBakeFileTagsLabels()}`);
|
||||||
}
|
}
|
||||||
);
|
);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user