fix: optimize npm and python setup steps in workflow
All checks were successful
sorting / run-scripts (push) Successful in 20m51s

This commit is contained in:
snusxd
2026-04-13 22:13:39 +03:00
parent cefb2c0e46
commit 83654e9ab9

View File

@@ -27,17 +27,19 @@ jobs:
uses: actions/setup-node@v4 uses: actions/setup-node@v4
with: with:
node-version: "20" node-version: "20"
cache: "npm"
- name: npm ci - name: npm ci
run: npm ci --prefer-offline --no-audit --no-fund run: npm ci --no-audit --no-fund
- name: setup python - name: setup python
uses: actions/setup-python@v5 uses: actions/setup-python@v5
with: with:
python-version: "3.13" python-version: "3.13"
cache: "pip"
- name: install python deps - name: install python deps
run: pip install --no-cache-dir -r requirements.txt run: pip install -r requirements.txt
- name: scripts - name: scripts
working-directory: ./scripts working-directory: ./scripts
@@ -50,10 +52,7 @@ jobs:
git config --local user.email "actions@gitea.local" git config --local user.email "actions@gitea.local"
git config --local user.name "Gitea Actions" git config --local user.name "Gitea Actions"
git add -A . git add -A .
# reset prevents huge artifact folders from being pushed back git reset _sprites/sorted _sprites/sorted-merged
git reset _sprites/sorted
git reset _sprites/sorted-merged
# [skip ci] prevents recursive pipeline runs
git commit -m "Auto-sort sprites [skip ci]" || exit 0 git commit -m "Auto-sort sprites [skip ci]" || exit 0
git push git push
@@ -72,6 +71,3 @@ jobs:
path: ./_sprites/sorted-merged path: ./_sprites/sorted-merged
retention-days: 45 retention-days: 45
compression-level: 0 compression-level: 0
- name: cleanup
run: rm -rf ./_sprites/sorted ./_sprites/sorted-merged