Skip to content

Generate rules v2

Generate rules v2 #74

Workflow file for this run

name: Generate rules v2
on:
workflow_dispatch:
schedule:
- cron: '0 0 * * 5'
jobs:
deploy:
name: Generate rules v2 for Dnsmasq/SwitchyOmega/Clash
runs-on: ubuntu-latest
env:
AccessToken: ${{secrets.COMMIT_SECRET}}
DeployKey: ${{secrets.ACTIONS_DEPLOY_KEY}}
steps:
- uses: actions/checkout@v3
- name: Init repo
shell: bash
run: |
git config --local user.name "GitHub Action"
git config --local user.email "actions-user@users.noreply.github.com"
- name: Commit and push files
shell: bash
env:
Branch: list
Origin2: accelerated-domains2.china.conf
Clash2: accelerated-domains2.china.yml
SwitchyOmega2: accelerated-domains2.china.sorl
run: |
git fetch --no-tags --prune --no-recurse-submodules --depth=1 origin $Branch
git checkout --force -B $Branch refs/remotes/origin/$Branch
sh ./gen2.sh
git add $Origin2 $Clash2 $SwitchyOmega2
git commit -m "$(date +%F)"
git push origin $Branch