Skip to content

Merge pull request #21 from GreenB0t/main #25

Merge pull request #21 from GreenB0t/main

Merge pull request #21 from GreenB0t/main #25

Workflow file for this run

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