Skip to content

Tags instead of Categories #50

Tags instead of Categories

Tags instead of Categories #50

name: Create Community Content
on:
workflow_dispatch:
pull_request:
paths:
- "src/content/resources/**.json"
permissions:
contents: write
pull-requests: write
jobs:
generate:
if: github.repository_owner == 'astrolicious'
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@a5ac7e51b41094c92402da3b24376905380afc29 # v4.1.6
with:
ref: ${{ github.event.pull_request.head.ref }}
- uses: pnpm/action-setup@fe02b34f77f8bc703788d5817da081398fad5dd2 # v4.0.0
- uses: actions/setup-node@60edb5dd545a775178f52524783378180af0d1f8 # v4
with:
node-version-file: ".nvmrc"
cache: "pnpm"
- run: pnpm i --frozen-lockfile
- uses: actions/github-script@60a0d83039c74a4aee543508d2ffcb1c3799cdea # v7.0.1
id: generator
with:
github-token: ${{secrets.GITHUB_TOKEN}}
script: |
const { default: script } = await import('${{ github.workspace }}/.github/scripts/mdx.js')
await script({github, context, core})
- uses: actions/create-github-app-token@c8f55efbd427e7465d6da1106e7979bc8aaee856 # v1.10.1
id: app-token
with:
app-id: ${{ vars.BOT_APPID }}
private-key: ${{ secrets.BOT_SECRET }}
- uses: stefanzweifel/git-auto-commit-action@8621497c8c39c72f3e2a999a26b4ca1b5058a842 # v5
with:
commit_user_email: 168325803+astrolicious[bot]@users.noreply.github.com
commit_user_name: astrolicious[bot]
commit_message: "[ci] update community content"
branch: ${{ github.head_ref }}