From aa376df1d0221536d926720532ae615e7ba13699 Mon Sep 17 00:00:00 2001 From: Ferdinand Thiessen Date: Thu, 3 Dec 2026 11:01:13 +0100 Subject: [PATCH] fix(workflows): keep merge freeze check out of the working tree The merge freeze check downloaded the server's version.php into the repository root and removed it afterwards. In nextcloud/server that file is tracked, so the check deleted it and the following npm build of the stable branches failed when the legacy webpack config tried to read it. Download the file into the runner's temporary directory instead. Assisted-by: ClaudeCode:claude-opus-5-5 Signed-off-by: Ferdinand Thiessen --- workflow-templates/npm-audit-fix.yml | 6 +++--- workflow-templates/sync-workflow-templates.yml | 6 +++--- workflow-templates/update-nextcloud-ocp.yml | 6 +++--- 3 files changed, 9 insertions(+), 9 deletions(-) diff --git a/workflow-templates/npm-audit-fix.yml b/workflow-templates/npm-audit-fix.yml index 5e506841..2283a837 100644 --- a/workflow-templates/npm-audit-fix.yml +++ b/workflow-templates/npm-audit-fix.yml @@ -64,12 +64,12 @@ jobs: echo 'Not based on master/main/stable*, so skipping freeze check' exit 0 fi - curl -sf "https://raw.githubusercontent.com/nextcloud/server/$SERVER_REF/version.php" --output version.php - if grep 'OC_VersionString' version.php | grep -q -i -E '(\.0\.0 RC[3-9]|\.[1-9][0-9]* RC)'; then + curl -sf "https://raw.githubusercontent.com/nextcloud/server/$SERVER_REF/version.php" --output "$RUNNER_TEMP/version.php" + if grep 'OC_VersionString' "$RUNNER_TEMP/version.php" | grep -q -i -E '(\.0\.0 RC[3-9]|\.[1-9][0-9]* RC)'; then echo "Merge freeze is active for $SERVER_REF, skipping" echo 'active=true' >> $GITHUB_OUTPUT fi - rm version.php + rm "$RUNNER_TEMP/version.php" - name: Read package.json node and npm engines version if: steps.freeze.outputs.active != 'true' diff --git a/workflow-templates/sync-workflow-templates.yml b/workflow-templates/sync-workflow-templates.yml index 8db0469d..0b67824e 100644 --- a/workflow-templates/sync-workflow-templates.yml +++ b/workflow-templates/sync-workflow-templates.yml @@ -71,12 +71,12 @@ jobs: echo 'Not based on master/main/stable*, so skipping freeze check' exit 0 fi - curl -sf "https://raw.githubusercontent.com/nextcloud/server/$SERVER_REF/version.php" --output version.php - if grep 'OC_VersionString' version.php | grep -q -i -E '(\.0\.0 RC[3-9]|\.[1-9][0-9]* RC)'; then + curl -sf "https://raw.githubusercontent.com/nextcloud/server/$SERVER_REF/version.php" --output "$RUNNER_TEMP/version.php" + if grep 'OC_VersionString' "$RUNNER_TEMP/version.php" | grep -q -i -E '(\.0\.0 RC[3-9]|\.[1-9][0-9]* RC)'; then echo "Merge freeze is active for $SERVER_REF, skipping" echo 'active=true' >> $GITHUB_OUTPUT fi - rm version.php + rm "$RUNNER_TEMP/version.php" - name: Copy all workflow templates if: steps.freeze.outputs.active != 'true' diff --git a/workflow-templates/update-nextcloud-ocp.yml b/workflow-templates/update-nextcloud-ocp.yml index dc536ed6..44d6bc60 100644 --- a/workflow-templates/update-nextcloud-ocp.yml +++ b/workflow-templates/update-nextcloud-ocp.yml @@ -67,12 +67,12 @@ jobs: echo 'Not based on master/main/stable*, so skipping freeze check' exit 0 fi - curl -sf "https://raw.githubusercontent.com/nextcloud/server/$SERVER_REF/version.php" --output version.php - if grep 'OC_VersionString' version.php | grep -q -i -E '(\.0\.0 RC[3-9]|\.[1-9][0-9]* RC)'; then + curl -sf "https://raw.githubusercontent.com/nextcloud/server/$SERVER_REF/version.php" --output "$RUNNER_TEMP/version.php" + if grep 'OC_VersionString' "$RUNNER_TEMP/version.php" | grep -q -i -E '(\.0\.0 RC[3-9]|\.[1-9][0-9]* RC)'; then echo "Merge freeze is active for $SERVER_REF, skipping" echo 'active=true' >> $GITHUB_OUTPUT fi - rm version.php + rm "$RUNNER_TEMP/version.php" - name: Get php version id: versions