Skip to content

Build & Release hezhijie0327/CNIPDb #2038

Build & Release hezhijie0327/CNIPDb

Build & Release hezhijie0327/CNIPDb #2038

Workflow file for this run

# Current Version: 1.1.8
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/checkout@v4
- name: Step 2 - Setup Go environment
uses: actions/setup-go@v5
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 "hezhijie0327@hotmail.com" -f "." -r "CNIPDb" -i "Generated by GitHub Actions" -m "push"