48 lines
1.3 KiB
YAML
48 lines
1.3 KiB
YAML
|
# yaml-language-server: $schema=https://json.schemastore.org/github-workflow.json
|
||
|
name: "Render Readme"
|
||
|
|
||
|
on:
|
||
|
workflow_call:
|
||
|
secrets:
|
||
|
BOT_APP_ID:
|
||
|
description: The App ID of the GitHub App
|
||
|
required: true
|
||
|
BOT_APP_PRIVATE_KEY:
|
||
|
description: The private key of the GitHub App
|
||
|
required: true
|
||
|
|
||
|
jobs:
|
||
|
render-readme:
|
||
|
name: Render README
|
||
|
runs-on: ubuntu-latest
|
||
|
steps:
|
||
|
- name: Checkout
|
||
|
uses: actions/checkout@v4
|
||
|
with:
|
||
|
token: "${{ secrets.GITHUB_TOKEN }}"
|
||
|
|
||
|
- name: Setup Python
|
||
|
uses: actions/setup-python@v5
|
||
|
with:
|
||
|
python-version: 3.x
|
||
|
cache: pip
|
||
|
|
||
|
- name: Install Python Requirements
|
||
|
shell: bash
|
||
|
run: pip install -r ./.forgejo/scripts/requirements.txt && pip freeze
|
||
|
|
||
|
- name: Render README
|
||
|
env:
|
||
|
GITHUB_TOKEN: "${{ secrets.GITHUB_TOKEN }}"
|
||
|
shell: bash
|
||
|
run: python ./.github/scripts/render-readme.py
|
||
|
|
||
|
- name: Commit Changes
|
||
|
shell: bash
|
||
|
run: |
|
||
|
git config --global user.name "forgejo-workflow"
|
||
|
git config --global user.email "tommy+forgejo@252.no"
|
||
|
git add ./README.org
|
||
|
git commit -m "chore: render README.org" || echo "No changes to commit"
|
||
|
git push origin || echo "No changes to push"
|