From 23412044dae01d55f2eaedc08a9dd996c65a69e1 Mon Sep 17 00:00:00 2001 From: Giacomo Sanchietti Date: Fri, 10 Jul 2026 08:24:19 +0200 Subject: [PATCH] fix(ci): skip DO Spaces publish on fork builds, archive packages instead Fork PR builds never get DO_SPACE_ACCESS_KEY/DO_SPACE_SECRET_KEY (GitHub withholds secrets from pull_request runs from forks even with secrets: inherit), so rclone auth fails and the job dies after the image already built fine. Gate the rclone publish steps on secret presence and fall back to tarring bin/packages as an uploaded artifact. Assisted-by: Claude Code:claude-sonnet-5 --- .github/workflows/build-image.yml | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/.github/workflows/build-image.yml b/.github/workflows/build-image.yml index d63b10077..bb9e2c12e 100644 --- a/.github/workflows/build-image.yml +++ b/.github/workflows/build-image.yml @@ -98,8 +98,10 @@ jobs: path: | build-logs - name: Setup rclone + if: ${{ secrets.DO_SPACE_ACCESS_KEY != '' && secrets.DO_SPACE_SECRET_KEY != '' }} uses: AnimMouse/setup-rclone@v1 - name: Copy Packages to repo + if: ${{ secrets.DO_SPACE_ACCESS_KEY != '' && secrets.DO_SPACE_SECRET_KEY != '' }} env: RCLONE_CONFIG_REPO_PROVIDER: DigitalOcean RCLONE_CONFIG_REPO_TYPE: s3 @@ -127,3 +129,12 @@ jobs: fi rclone copy latest_release repo:nethsecurity/${{ inputs.repo_channel }}/ --progress + - name: Archive packages (no repo secrets available) + if: ${{ secrets.DO_SPACE_ACCESS_KEY == '' || secrets.DO_SPACE_SECRET_KEY == '' }} + run: tar -czf packages.tar.gz -C bin packages + - name: Upload packages archive + if: ${{ secrets.DO_SPACE_ACCESS_KEY == '' || secrets.DO_SPACE_SECRET_KEY == '' }} + uses: actions/upload-artifact@v7 + with: + name: packages-archive + path: packages.tar.gz