chore: upload offline npm caches with a Gitea-compatible action
The v4 artifact upload rejected the packed Linux caches. Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
@@ -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}"
|
||||
|
||||
Reference in New Issue
Block a user