Skip to content

Commit

Permalink
update workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
PaPerseller committed Nov 24, 2024
1 parent 4fda0c6 commit 22d3331
Showing 1 changed file with 20 additions and 18 deletions.
38 changes: 20 additions & 18 deletions .github/workflows/update-cnip.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,11 +18,10 @@ jobs:
- name: Set up Python
uses: actions/setup-python@main
with:
python-version: '3.12'
python-version: '3.x'
check-latest: true
- name: Install dependencies
run: |
python -m pip install --upgrade pip
run:
pip install netaddr requests

- name: generate cn iplist
Expand All @@ -35,18 +34,21 @@ jobs:
python "$script" &
done
- name: Commit file
run: |
git config user.name 'github-actions[bot]'
git config user.email 'github-actions[bot]@users.noreply.github.com'
git add chnroute.txt
git add chnroute-ipv4.txt
git add chnroute-ipv6.txt
git add cn.rsc
git add ipv6.list
git add ./Loon/ruleset/ipv6.list
git add chn.acl
git add v2ray-config_rule.json
git add chnroute.pac
git commit -m "Update `date +%Y-%m-%d`" -a --author="${GITHUB_ACTOR} <${GITHUB_EMAIL}> github-actions[bot] <github-actions[bot]@users.noreply.github.com>"
git push -f origin master
- name: Get current date
id: date
run: echo "date=$(date +%Y-%m-%d)" >> $GITHUB_OUTPUT

- name: Commit changes
uses: stefanzweifel/git-auto-commit-action@v5
with:
commit_message: "Update ${{ steps.date.outputs.date }}"
file_pattern: |
chnroute.txt
chnroute-ipv4.txt
chnroute-ipv6.txt
cn.rsc
ipv6.list
Loon/ruleset/ipv6.list
chn.acl
v2ray-config_rule.json
chnroute.pac

0 comments on commit 22d3331

Please sign in to comment.