update location db #986
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 | |