From e46a9bddaf994625848c7beebb25e08369814c0f Mon Sep 17 00:00:00 2001 From: David Baker Date: Thu, 21 May 2026 13:30:30 +0100 Subject: [PATCH] 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 --- knip.ts | 2 +- packages/playwright-common/project.json | 5 ++--- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/knip.ts b/knip.ts index 9d4fab1d49..2f07834a07 100644 --- a/knip.ts +++ b/knip.ts @@ -12,7 +12,7 @@ export default { // Used in playwright-screenshots.sh "wait-on", ], - ignoreBinaries: ["awk"], + ignoreBinaries: ["awk", "printf"], }, "packages/module-api": {}, "apps/web": { diff --git a/packages/playwright-common/project.json b/packages/playwright-common/project.json index 77f9990b89..84d3364f49 100644 --- a/packages/playwright-common/project.json +++ b/packages/playwright-common/project.json @@ -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"] } } }