Build & Release hezhijie0327/CNIPDb #1796
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
# Current Version: 1.1.7 | |
name: Build & Release hezhijie0327/CNIPDb | |
on: | |
push: | |
branches: [main] | |
schedule: | |
- cron: "0 0 * * *" | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Step 1 - Checkout | |
uses: actions/[email protected] | |
- name: Step 2 - Setup Go environment | |
uses: actions/[email protected] | |
with: | |
check-latest: true | |
go-version: '>=1.18.0' | |
- name: Step 3 - Build CNIPDb | |
run: | | |
git clone --depth 1 "https://github.com/zhanhb/cidr-merger" && cd ./cidr-merger && go install . && cd .. && rm -rf ./cidr-merger | |
git clone --depth 1 "https://github.com/Loyalsoldier/geoip" && cd ./geoip && go install . && cd .. && rm -rf ./geoip | |
curl -s "https://raw.githubusercontent.com/hezhijie0327/CNIPDb/source/release.sh" | sed "s/{GEOLITE2\_TOKEN}/${{ secrets.GEOLITE2_TOKEN }}/g;s/{IP2LOCATION\_TOKEN}/${{ secrets.IP2LOCATION_TOKEN }}/g;s/{IPINFOIO\_TOKEN}/${{ secrets.IPINFOIO_TOKEN }}/g" | sudo bash | |
- name: Step 4 - Release CNIPDb | |
run: | | |
curl -s "https://raw.githubusercontent.com/hezhijie0327/Toolkit/main/Git.sh" > "/tmp/Git.sh" | |
sudo bash "/tmp/Git.sh" -u "hezhijie0327" -e "[email protected]" -f "." -r "CNIPDb" -i "Generated by GitHub Actions" -m "push" |