Skip to content

update location db #894

update location db

update location db #894

name: update location db
on:
schedule:
- cron: '00 00 * * *'
env:
DB_TOKEN_SECRET: ${{ secrets.LOCATION_DB_TOKEN_SECRET }}
jobs:
execute:
name: update location db
runs-on: ubuntu-latest
steps:
- name: checkout
uses: actions/checkout@v3
with:
persist-credentials: false
fetch-depth: 0
- name: update
run: |
wget -S "https://www.ip2location.com/download/?token=$DB_TOKEN_SECRET&file=DB9LITEBIN" -O contrib/location/location.db
- name: commit
continue-on-error: true
run: |
ls -la contrib/location/location.db
git config user.name github-actions
git config user.email [email protected]
git commit -am "update location DB"
- name: push
uses: ad-m/github-push-action@master
with:
github_token: ${{ secrets.UPDATE_LOCATION_GITHUB_TOKEN }}
branch: main