mirror of
https://github.com/mustbeperfect/definitive-opensource.git
synced 2026-04-18 00:54:03 +02:00
44 lines
1.1 KiB
YAML
44 lines
1.1 KiB
YAML
|
|
name: Format Maintenance
|
|
|
|
on:
|
|
workflow_dispatch:
|
|
schedule:
|
|
- cron: '0 1 * * 1'
|
|
|
|
jobs:
|
|
generate:
|
|
runs-on: ubuntu-latest
|
|
|
|
permissions:
|
|
contents: write
|
|
|
|
steps:
|
|
- name: Checkout repository
|
|
uses: actions/checkout@v6
|
|
with:
|
|
token: ${{ secrets.GITHUB_TOKEN }}
|
|
persist-credentials: true
|
|
|
|
- name: Set up Python
|
|
uses: actions/setup-python@v6
|
|
with:
|
|
python-version-file: 'pyproject.toml'
|
|
|
|
- name: Install UV
|
|
uses: astral-sh/setup-uv@v7
|
|
|
|
- name: Install project
|
|
run: uv sync --no-dev
|
|
|
|
- name: Run script to check for format errors
|
|
run: uv run ./core/source/maintenance/json_formatter.py
|
|
|
|
- name: Commit and push changes
|
|
run: |
|
|
git config --global user.name "github-actions[bot]"
|
|
git config --global user.email "github-actions[bot]@users.noreply.github.com"
|
|
git add resources/maintenance/format_maintenance.md
|
|
git diff --quiet && git diff --staged --quiet || git commit -m "Format Maintenance"
|
|
git push
|