name: sorting on: push: branches: [main] paths: - "_sprites/**" - "scripts/**" - ".gitea/**" concurrency: group: sorting-${{ gitea.ref }} cancel-in-progress: true permissions: contents: write jobs: run-scripts: if: gitea.actor != 'gitea-actions' runs-on: ubuntu-latest steps: - name: checkout uses: actions/checkout@v4 - name: setup node uses: actions/setup-node@v4 with: node-version: "20" cache: "npm" - name: npm ci run: npm ci --no-audit --no-fund - name: setup python uses: actions/setup-python@v5 with: python-version: "3.13" cache: "pip" - name: install python deps run: pip install -r requirements.txt - name: scripts working-directory: ./scripts run: | rm -rf ../_sprites/unready npx tsx write.ts && npx tsx sort.ts && npx tsx unready.ts - name: commit changes run: | git config --local user.email "actions@gitea.local" git config --local user.name "Gitea Actions" git add -A . git reset _sprites/sorted _sprites/sorted-merged git commit -m "Auto-sort sprites [skip ci]" || exit 0 git push - name: upload sorted uses: christopherhx/gitea-upload-artifact@v4 with: name: sorted path: ./_sprites/sorted retention-days: 15 compression-level: 0 - name: upload sorted-merged uses: christopherhx/gitea-upload-artifact@v4 with: name: sorted-merged path: ./_sprites/sorted-merged retention-days: 45 compression-level: 0