Skip to content

Update Rules

Update Rules #330

Workflow file for this run

name: Update Rules
on:
schedule:
- cron: '0 0 * * *'
workflow_dispatch:
jobs:
check-rules:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v2
- name: Set up Python
uses: actions/setup-python@v2
with:
python-version: '3.x'
- name: Install dependencies
run: |
pip install requests
- name: Check if rules have changed and update
run: python bin/updaterules.py
- name: Set up Git
run: |
git config user.name "GitHub Actions"
git config user.email "[email protected]"
git remote set-url origin https://${{ secrets.GITHUB_TOKEN }}@github.com/${{ github.repository }}
- name: Commit and push changes
run: |
git add rule_files/*
git commit -m "Update rule files" || exit 0
git push origin HEAD:${{ github.ref }}