From 6d87a64ffe8858519de8b296ee1feed6cf87c728 Mon Sep 17 00:00:00 2001 From: turegjorup Date: Mon, 4 May 2026 20:55:51 +0200 Subject: [PATCH 1/2] Fix Create Github Release workflow node_modules permissions The node compose service ran as root, leaving root-owned files in the bind-mounted node_modules/. The runner-side Cleanup before packaging step then could not rm them and the release was never created. - Add overridable user to the node service (defaults to root so local-dev behavior is unchanged). - Set COMPOSE_NODE_USER to the runner UID:GID and pass HOME=/tmp so npm can write its cache when not running as root. - Align .dockerignore with the workflow's cleanup list (phpstan-baseline.neon, /playwright/). Co-Authored-By: Claude Opus 4.7 (1M context) --- .dockerignore | 3 ++- .github/workflows/github_build_release.yml | 7 +++++-- CHANGELOG.md | 2 ++ docker-compose.override.yml | 1 + 4 files changed, 10 insertions(+), 3 deletions(-) diff --git a/.dockerignore b/.dockerignore index 7cd4dd2b..abc0c3b1 100644 --- a/.dockerignore +++ b/.dockerignore @@ -26,6 +26,7 @@ # CI / quality-tool configs (not consumed at runtime) /phpstan.dist.neon +/phpstan-baseline.neon /phpunit.xml.dist /psalm.xml /psalm-baseline.xml @@ -65,7 +66,7 @@ launch.json /test-results/ /playwright-report/ /blob-report/ -/playwright/.cache/ +/playwright/ #< Playwright ###> vincentlanglet/twig-cs-fixer ### diff --git a/.github/workflows/github_build_release.yml b/.github/workflows/github_build_release.yml index 19aecc2f..66a54656 100644 --- a/.github/workflows/github_build_release.yml +++ b/.github/workflows/github_build_release.yml @@ -38,10 +38,13 @@ jobs: composer install --no-dev -o --classmap-authoritative docker compose run --rm --env APP_ENV=prod phpfpm composer clear-cache + - name: Set compose node user + run: echo "COMPOSE_NODE_USER=$(id -u):$(id -g)" >> "$GITHUB_ENV" + - name: NPM install and build run: | - docker compose run --rm node npm install - docker compose run --rm node npm run build + docker compose run --rm --env HOME=/tmp node npm install + docker compose run --rm --env HOME=/tmp node npm run build - name: Cleanup before packaging run: | diff --git a/CHANGELOG.md b/CHANGELOG.md index f1acfdd4..2d4fb89c 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,6 +4,8 @@ All notable changes to this project will be documented in this file. ## [Unreleased] +- Fixed `Create Github Release` workflow failing in `Cleanup before packaging` due to root-owned `node_modules` from the `node` compose service. + ## [3.0.0-rc1] - 2026-05-04 - Cleaned up and documented CI workflows; api-spec workflow now reports breaking changes. diff --git a/docker-compose.override.yml b/docker-compose.override.yml index ec0c8183..9897eddb 100644 --- a/docker-compose.override.yml +++ b/docker-compose.override.yml @@ -15,6 +15,7 @@ services: node: image: node:24 + user: "${COMPOSE_NODE_USER:-root}" command: npm run dev networks: - app From 1ce6a32837fa58e624eeb1d74af00cd944a82961 Mon Sep 17 00:00:00 2001 From: turegjorup Date: Tue, 5 May 2026 09:41:44 +0200 Subject: [PATCH 2/2] Shorten CHANGELOG entry to fit markdownlint MD013 Co-Authored-By: Claude Opus 4.7 (1M context) --- CHANGELOG.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 2d4fb89c..9f043015 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,7 +4,7 @@ All notable changes to this project will be documented in this file. ## [Unreleased] -- Fixed `Create Github Release` workflow failing in `Cleanup before packaging` due to root-owned `node_modules` from the `node` compose service. +- Fixed `Create Github Release` workflow that failed cleanup because `node_modules/` was owned by root. ## [3.0.0-rc1] - 2026-05-04