mirror of
https://github.com/vector-im/element-web.git
synced 2026-05-26 17:08:21 +00:00
e46a9bddaf
* 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
44 lines
1.8 KiB
JSON
44 lines
1.8 KiB
JSON
{
|
|
"$schema": "../../node_modules/nx/schemas/project-schema.json",
|
|
"projectType": "library",
|
|
"root": "packages/playwright-common",
|
|
"targets": {
|
|
"build:playwright": {
|
|
"cache": true,
|
|
"command": "tsc",
|
|
"inputs": ["src"],
|
|
"outputs": ["{projectRoot}/lib"],
|
|
"options": { "cwd": "packages/playwright-common" },
|
|
"dependsOn": ["^build"]
|
|
},
|
|
"lint:types": {
|
|
"command": "pnpm exec tsc --noEmit",
|
|
"options": { "cwd": "packages/playwright-common" },
|
|
"dependsOn": ["^build"]
|
|
},
|
|
"docker:prebuild": {
|
|
"cache": true,
|
|
"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" }
|
|
},
|
|
"docker:build": {
|
|
"executor": "@nx-tools/nx-container:build",
|
|
"dependsOn": ["docker:prebuild"],
|
|
"options": {
|
|
"load": true,
|
|
"engine": "docker",
|
|
"platforms": ["linux/amd64", "linux/arm64"],
|
|
"provenance": "true",
|
|
"sbom": true,
|
|
"build-args": ["PLAYWRIGHT_VERSION"],
|
|
"context": "{projectRoot}",
|
|
"metadata": {
|
|
"images": ["ghcr.io/element-hq/element-web/playwright-server"]
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|