Sync upstream rulesets #36
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: Sync upstream rulesets | |
| on: | |
| schedule: | |
| - cron: "23 2 * * *" | |
| workflow_dispatch: | |
| permissions: | |
| contents: write | |
| concurrency: | |
| group: sync-rulesets | |
| cancel-in-progress: false | |
| jobs: | |
| sync: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: actions/setup-python@v5 | |
| with: | |
| python-version: "3.12" | |
| - name: Sync and validate | |
| run: | | |
| python3 scripts/sync.py | |
| python3 scripts/validate.py | |
| python3 scripts/public_check.py | |
| - name: Commit changed snapshots | |
| run: | | |
| if git diff --quiet; then | |
| echo "No upstream changes." | |
| exit 0 | |
| fi | |
| git config user.name "github-actions[bot]" | |
| git config user.email "41898282+github-actions[bot]@users.noreply.github.com" | |
| git add ruleset sources.lock.json \ | |
| config/rule-providers.local.yaml \ | |
| config/rule-providers.remote.yaml | |
| git commit -m "chore: sync upstream rulesets" | |
| git push |