Pass tags with INPUT_TAGS in docker bake job (#33574)

* Pass tags with INPUT_TAGS in docker bake job

Truly hideous mess of shell to set both env vars in the prebuild step.

As the env var doesn't seem to be available to the actual executor
but clearly must be available to the docker that it runs.

* gnore printf, it's a shell builtin
This commit is contained in:
David Baker
2026-05-21 13:30:30 +01:00
committed by GitHub
parent 80024991aa
commit e46a9bddaf
2 changed files with 3 additions and 4 deletions
+1 -1
View File
@@ -12,7 +12,7 @@ export default {
// Used in playwright-screenshots.sh
"wait-on",
],
ignoreBinaries: ["awk"],
ignoreBinaries: ["awk", "printf"],
},
"packages/module-api": {},
"apps/web": {
+2 -3
View File
@@ -18,7 +18,7 @@
},
"docker:prebuild": {
"cache": true,
"command": "echo PLAYWRIGHT_VERSION=$(pnpm --silent -- playwright --version | awk '{print $2}') > .env.docker:build",
"command": "PLAYWRIGHT_VERSION=$(pnpm --silent -- playwright --version | awk '{print $2}') && printf '%s\\n' \"PLAYWRIGHT_VERSION=$PLAYWRIGHT_VERSION\" \"INPUT_TAGS=\\\"type=ref,event=branch\\ntype=raw,enable={{is_default_branch}},value=$PLAYWRIGHT_VERSION\\\"\" > .env.docker:build",
"inputs": [{ "runtime": "pnpm --silent -- playwright --version" }],
"outputs": ["{projectRoot}/.env.docker:build"],
"options": { "cwd": "packages/playwright-common" }
@@ -35,8 +35,7 @@
"build-args": ["PLAYWRIGHT_VERSION"],
"context": "{projectRoot}",
"metadata": {
"images": ["ghcr.io/element-hq/element-web/playwright-server"],
"tags": ["type=ref,event=branch", "type=raw,enable={{is_default_branch}},value=$PLAYWRIGHT_VERSION"]
"images": ["ghcr.io/element-hq/element-web/playwright-server"]
}
}
}