Skip to content

Visual tweaks and Garbage collection #2

Visual tweaks and Garbage collection

Visual tweaks and Garbage collection #2

name: Update Configs (CVars + Headers)
on:
push:
branches: [main]
paths:
- "\\[V3.x\\] Working Configs/**"
- ".github/forbidden_cvars.txt"
- ".github/scripts/update_configs.py"
pull_request:
paths:
- "\\[V3.x\\] Working Configs/**"
- ".github/forbidden_cvars.txt"
workflow_dispatch:
jobs:
scan-and-update:
runs-on: ubuntu-latest
# Loop guard: skip runs triggered by the bot's own commits, so it doesn't
# re-trigger itself forever after pushing a cleanup commit.
if: github.actor != 'github-actions[bot]'
permissions:
contents: write
steps:
- uses: actions/checkout@v6
with:
fetch-depth: 0 # full history needed for the changelog diff
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: "3.12"
- name: Run CVar + header updater
id: scan
run: |
python3 .github/scripts/update_configs.py
continue-on-error: true
- name: Fail PR if changes were needed
if: github.event_name == 'pull_request' && steps.scan.outcome == 'failure'
run: |
echo "::error::Forbidden CVars and/or header updates are needed for this PR. See the log above. These will be auto-applied after merge to main."
exit 1
- name: Commit updated files
if: github.event_name != 'pull_request' && steps.scan.outcome == 'failure'
run: |
git config user.name "github-actions[bot]"
git config user.email "41898282+github-actions[bot]@users.noreply.github.com"
git add "[V3.x] Working Configs"
git commit -m "chore: auto-update configs (CVars + changelog)"
git push