userPFP/.forgejo/workflows/generate-db.yml

57 lines
1.3 KiB
YAML

name: Generate Database
on:
push:
branches:
- main
paths:
- ".forgejo/workflows/generate-source.yml"
- ".forgejo/scripts/generate/**/*.*"
- "source/data.json"
- "source/template.css"
pull_request:
branches:
- main
workflow_dispatch:
concurrency:
group: ${{ github.ref }}
cancel-in-progress: true
jobs:
generate:
runs-on: docker
container:
image: code.forgejo.org/oci/node:22-bookworm
permissions:
contents: write
# v this isn't really needed v
# strategy:
# matrix:
# retry-max: [3] # Set the maximum number of retries here
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: 18.x
- name: Setup PNPM
working-directory: .forgejo/scripts
run: |
npm i -g pnpm
pnpm i
- name: Run generate script
working-directory: .forgejo/scripts
run: pnpm run generate
- name: Push changes
run: |
git config --global user.name "github-actions[bot]"
git config --global user.email "bot@dorkbutt.lol"
git add import.css
git commit -m "Update import.css (${{ github.sha || 'manual trigger' }})" || true
git push