From 0d834862435d10e5bceaa00a9822e8b3fdcf4551 Mon Sep 17 00:00:00 2001 From: aitbc1 Date: Fri, 27 Mar 2026 12:42:53 +0100 Subject: [PATCH] fix: implement nuclear workspace fix + runner configuration CRITICAL FIX: Force workspace directory to bypass act_runner host mode issues Runner Configuration Changes: - Set workdir: /opt/gitea-runner/work in gitea-runner/.runner - Created /opt/gitea-runner/work directory - Restarted gitea-runner service to apply configuration - This should fix the hostexecutor vs workspace issue Workflow Nuclear Fix: - Force workspace creation: mkdir -p /opt/gitea-runner/workspace - Manual clone in correct location: cd /opt/gitea-runner/workspace - Bypass all act_runner workspace handling completely - Single-step execution to avoid step isolation issues Updated workflows: - test.yml: Full nuclear fix with verification - audit.yml: Nuclear fix for dependency auditing - fix.yml: Nuclear fix for vulnerability fixing This provides two layers of protection: 1. Runner-level workdir configuration fix 2. Workflow-level manual workspace forcing Expected result: - npm install should now run in /opt/gitea-runner/workspace/repo - package.json should be found and accessible - No more ENOENT errors for missing files --- .gitea/workflows/audit.yml | 15 ++++++--------- .gitea/workflows/fix.yml | 15 ++++++--------- .gitea/workflows/test.yml | 23 ++++++----------------- 3 files changed, 18 insertions(+), 35 deletions(-) diff --git a/.gitea/workflows/audit.yml b/.gitea/workflows/audit.yml index 8747263c..cd8c0917 100644 --- a/.gitea/workflows/audit.yml +++ b/.gitea/workflows/audit.yml @@ -9,15 +9,12 @@ jobs: runs-on: debian steps: - - name: Clone repository + - name: Full control execution (nuclear fix) run: | + mkdir -p /opt/gitea-runner/workspace + cd /opt/gitea-runner/workspace rm -rf repo git clone https://gitea.bubuit.net/oib/aitbc.git repo - - - name: Install dependencies - working-directory: repo - run: npm install - - - name: Audit dependencies - working-directory: repo - run: npm audit || true + cd repo + npm install + npm audit || true diff --git a/.gitea/workflows/fix.yml b/.gitea/workflows/fix.yml index d78beac9..12f0315e 100644 --- a/.gitea/workflows/fix.yml +++ b/.gitea/workflows/fix.yml @@ -9,15 +9,12 @@ jobs: runs-on: debian steps: - - name: Clone repository + - name: Full control execution (nuclear fix) run: | + mkdir -p /opt/gitea-runner/workspace + cd /opt/gitea-runner/workspace rm -rf repo git clone https://gitea.bubuit.net/oib/aitbc.git repo - - - name: Install dependencies - working-directory: repo - run: npm install - - - name: Auto fix vulnerabilities - working-directory: repo - run: npm audit fix || true + cd repo + npm install + npm audit fix || true diff --git a/.gitea/workflows/test.yml b/.gitea/workflows/test.yml index b07993d8..0ef610ae 100644 --- a/.gitea/workflows/test.yml +++ b/.gitea/workflows/test.yml @@ -9,29 +9,18 @@ jobs: runs-on: debian steps: - - name: Clone repository + - name: Full control execution (nuclear fix) run: | + mkdir -p /opt/gitea-runner/workspace + cd /opt/gitea-runner/workspace rm -rf repo git clone https://gitea.bubuit.net/oib/aitbc.git repo - - - name: Verify repository context - working-directory: repo - run: | - echo "Current working directory:" + cd repo pwd - echo "Files in directory:" ls -la echo "Looking for package.json:" ls -la package.json || echo "package.json not found" - - - name: Install dependencies - working-directory: repo - run: npm install --legacy-peer-deps - - - name: Test runner - working-directory: repo - run: | - echo "Runner OK" + npm install --legacy-peer-deps + echo "Runner verification:" hostname whoami - pwd