Files
Ely-GPUI-Showcases/.github/workflows/catalog.yml
T

68 lines
1.6 KiB
YAML

name: Catalog
on:
pull_request:
push:
branches: [main]
schedule:
# Mondays, 00:00 UTC.
- cron: "0 0 * * 1"
workflow_dispatch:
permissions:
contents: read
concurrency:
group: catalog-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: false
jobs:
validate:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v7
with:
persist-credentials: false
- uses: pnpm/action-setup@v6
with:
version: 11
- uses: actions/setup-node@v7
with:
node-version: 24
cache: pnpm
- run: pnpm install --frozen-lockfile
- run: pnpm test
- run: pnpm validate
stars:
needs: validate
if: github.event_name != 'pull_request' && github.ref == 'refs/heads/main'
runs-on: ubuntu-latest
permissions:
contents: write
steps:
- uses: actions/checkout@v7
with:
ref: main
- uses: pnpm/action-setup@v6
with:
version: 11
- uses: actions/setup-node@v7
with:
node-version: 24
cache: pnpm
- run: pnpm install --frozen-lockfile
- run: pnpm stars
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- run: pnpm validate
- name: Commit stars
run: |
git config user.name 'github-actions[bot]'
git config user.email '41898282+github-actions[bot]@users.noreply.github.com'
git add apps
if ! git diff --cached --quiet; then
git commit -m 'Update GitHub stars'
git push origin HEAD:main
fi