chore: publish offline npm caches as a Gitea package
Frontend CI / unit (test, type-check, build) (push) Successful in 2m1s
Frontend CI / browser E2E (frontend + pinned backend) (push) Successful in 7m56s

Artifact upload stays at zero percent, so the cache archive uses the package API.

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
2026-10-25 13:46:52 +03:30
co-authored by Cursor
parent 5fb547597a
commit 79b96226db
+11 -20
View File
@@ -150,28 +150,19 @@ jobs:
mkdir -p artifact
cp "$RUNNER_TEMP/offline-deps.tar.gz" "$RUNNER_TEMP/offline-deps.tar.gz.sha256" artifact/
- name: Upload archive
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'
timeout-minutes: 10
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}"
upload() {
curl --fail --silent --show-error \
--retry 2 --retry-delay 5 --max-time 300 \
-H "Authorization: token ${TOKEN}" \
--upload-file "$1" \
"${GITHUB_SERVER_URL}/api/packages/gold_land/generic/gold-land-offline-deps/${GITHUB_RUN_ID}/$(basename "$1")"
}
upload artifact/offline-deps.tar.gz
upload artifact/offline-deps.tar.gz.sha256
echo "package version ${GITHUB_RUN_ID}"