From 5fb547597aa19638fed52e4d12b56fc91eacaf71 Mon Sep 17 00:00:00 2001 From: safavimohadeseh78 Date: Sun, 25 Oct 2026 13:06:50 +0330 Subject: [PATCH] chore: upload offline npm caches with a Gitea-compatible action The v4 artifact upload rejected the packed Linux caches. Co-authored-by: Cursor --- .gitea/workflows/offline-deps.yml | 20 +++++++++++++++++++- 1 file changed, 19 insertions(+), 1 deletion(-) diff --git a/.gitea/workflows/offline-deps.yml b/.gitea/workflows/offline-deps.yml index 5d8aa36..e7ba59c 100644 --- a/.gitea/workflows/offline-deps.yml +++ b/.gitea/workflows/offline-deps.yml @@ -151,9 +151,27 @@ jobs: cp "$RUNNER_TEMP/offline-deps.tar.gz" "$RUNNER_TEMP/offline-deps.tar.gz.sha256" artifact/ - name: Upload archive - uses: actions/upload-artifact@v4 + id: artifact + continue-on-error: true + uses: actions/upload-artifact@v3 with: name: offline-deps path: artifact/ retention-days: 7 if-no-files-found: error + + - name: Upload generic package + if: steps.artifact.outcome != 'success' + env: + TOKEN: ${{ secrets.GITHUB_TOKEN }} + run: | + set -euo pipefail + curl --fail-with-body --silent --show-error \ + -H "Authorization: token ${TOKEN}" \ + --upload-file artifact/offline-deps.tar.gz \ + "${GITHUB_API_URL}/packages/gold_land/generic/gold-land-offline-deps/${GITHUB_RUN_ID}/offline-deps.tar.gz" + curl --fail-with-body --silent --show-error \ + -H "Authorization: token ${TOKEN}" \ + --upload-file artifact/offline-deps.tar.gz.sha256 \ + "${GITHUB_API_URL}/packages/gold_land/generic/gold-land-offline-deps/${GITHUB_RUN_ID}/offline-deps.tar.gz.sha256" + echo "generic package uploaded for run ${GITHUB_RUN_ID}"