Skip to content

Commit

Permalink
update location db
Browse files Browse the repository at this point in the history
  • Loading branch information
eranra committed Mar 6, 2022
1 parent 6d1be78 commit 4cfa1d9
Showing 1 changed file with 34 additions and 0 deletions.
34 changes: 34 additions & 0 deletions .github/workflows/update_location_db.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
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@v2
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
run: |
ls -la contrib/location/location.db
git config user.name github-actions
git config user.email github-actions@github.com
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

0 comments on commit 4cfa1d9

Please sign in to comment.