Skip to content

Update CN ip

Update CN ip #63

Workflow file for this run

name: Update CN ip
on:
workflow_dispatch:
schedule:
- cron: '0 */8 * * *'
jobs:
update:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Set variables
run: |
echo "COMMIT_MSG=$(date '+%Y-%m-%d %H:%M:%S')" >> $GITHUB_ENV
git config user.name 'github-actions[bot]'
git config user.email "41898282+github-actions[bot]@users.noreply.github.com"
shell: bash
- name: Assemble Artifact
run: |
cp cnip-update.sh ../
git checkout data
cp ../cnip-update.sh .
- name: Update CN ip
run: |
./cnip-update.sh
rm cnip-update.sh
- name: Push Commits
run: |
git add cnv*
git diff-index --quiet HEAD || { git commit -m "${{ env.COMMIT_MSG }}" && git push -u origin data ; }