Merge pull request #21 from GreenB0t/main #25
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: Theme catalog | |
| on: | |
| push: | |
| branches: [main] | |
| paths: | |
| - 'themes/**' | |
| - 'tweaks/**' | |
| - 'catalog.json' | |
| - 'scripts/build-catalog.mjs' | |
| - '.github/workflows/catalog.yml' | |
| workflow_dispatch: | |
| permissions: | |
| contents: write | |
| concurrency: | |
| group: theme-catalog-${{ github.ref }} | |
| cancel-in-progress: true | |
| jobs: | |
| build: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Build catalog.json | |
| env: | |
| GITHUB_REPOSITORY: ${{ github.repository }} | |
| GITHUB_REF_NAME: ${{ github.ref_name }} | |
| run: node scripts/build-catalog.mjs | |
| - name: Commit if changed | |
| run: | | |
| git config user.name "github-actions[bot]" | |
| git config user.email "41898282+github-actions[bot]@users.noreply.github.com" | |
| git add catalog.json | |
| if git diff --staged --quiet; then | |
| echo "catalog.json already up to date." | |
| else | |
| git commit -m "chore: regenerate catalog.json" | |
| git push | |
| fi |