Skip to content

Renew

Renew #22

Workflow file for this run

name: Renew
on:
schedule:
- cron: 0 9 1 * *
jobs:
renew:
name: Renew
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Download
run: |
echo "NOW=$(date +'%Y.%m.%d')" >> $GITHUB_ENV
wget "https://www.ip2location.com/download/?token=${{ secrets.IP2LOCATION_TOKEN }}&file=DB11LITEBIN" -O ./IP2LOCATION-LITE-DB11.BIN.ZIP
wget "https://www.ip2location.com/download/?token=${{ secrets.IP2LOCATION_TOKEN }}&file=DB11LITEBINIPV6" -O ./IP2LOCATION-LITE-DB11.IPV6.BIN.ZIP
- name: Commit
uses: stefanzweifel/git-auto-commit-action@v4
with:
commit_message: Renew Database
commit_user_name: github-actions[bot]
commit_user_email: github-actions[bot]@renfei.net
commit_author: github-actions[bot] <github-actions[bot]@renfei.net>
tagging_message: ${{ env.NOW }}
- name: Unzip
run: |
mkdir ./BIN
unzip -o IP2LOCATION-LITE-DB11.BIN.ZIP -d ./BIN
unzip -o IP2LOCATION-LITE-DB11.IPV6.BIN.ZIP -d ./BIN
- name: Release
uses: marvinpinto/action-automatic-releases@latest
with:
repo_token: ${{ secrets.YOURTOKEN }}
automatic_release_tag: ${{ env.NOW }}
prerelease: false
title: ${{ env.NOW }}