Compare commits

...

6 Commits

Author SHA1 Message Date
Dreamacro 4d5c0802e0 Update actions version 2025-05-10 01:05:49 +08:00
Dreamacro f7c8536ef6 Add release branch 2021-01-30 00:34:07 +08:00
Dreamacro dae4f35c40 Fix action monthly build 2020-08-12 10:56:30 +08:00
Dreamacro 72751ea0d8 Add auto monthly build 2020-07-16 00:34:46 +08:00
Dreamacro 1de7f3697a
Update README.md 2019-12-31 15:30:48 +08:00
Dreamacro 16cf150b28
Update README.md 2019-12-31 15:30:21 +08:00
3 changed files with 62 additions and 23 deletions

View File

@ -1,23 +0,0 @@
name: bash
on: [push]
jobs:
build:
name: Pull and Release
runs-on: ubuntu-latest
steps:
- name: Download file
env:
LICENSE_KEY: ${{ secrets.LICENSE_KEY }}
run: |
wget -O ./GeoLite2-Country.tar.gz "https://download.maxmind.com/app/geoip_download?edition_id=GeoLite2-Country&license_key=${LICENSE_KEY}&suffix=tar.gz"
tar zxvf ./GeoLite2-Country.tar.gz -C .
mv ./GeoLite2-Country_*/GeoLite2-Country.mmdb ./Country.mmdb
- name: Upload Release
uses: softprops/action-gh-release@v1
if: startsWith(github.ref, 'refs/tags/')
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
files: Country.mmdb

58
.github/workflows/crontab.yml vendored Normal file
View File

@ -0,0 +1,58 @@
name: Monthly Build
on:
workflow_dispatch:
schedule:
- cron: 0 0 12 * *
jobs:
build:
name: Pull and Release
runs-on: ubuntu-latest
steps:
- name: Check out repo
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: git tag
uses: actions/github-script@v7
id: tag
with:
script: |
const now = new Date()
return `${now.getFullYear()}${(now.getMonth() + 1).toString().padStart(2, '0')}${now.getDate().toString().padStart(2, '0')}`
result-encoding: string
- name: Push Tag
run: |
git config --global user.name 'Dreamacro'
git config --global user.email 'dreamacro@users.noreply.github.com'
git remote set-url origin https://x-access-token:${{ secrets.GITHUB_TOKEN }}@github.com/$GITHUB_REPOSITORY
git tag ${{steps.tag.outputs.result}}
git push origin ${{steps.tag.outputs.result}}
- name: Download file
env:
LICENSE_KEY: ${{ secrets.LICENSE_KEY }}
run: |
wget -O ./GeoLite2-Country.tar.gz "https://download.maxmind.com/app/geoip_download?edition_id=GeoLite2-Country&license_key=${LICENSE_KEY}&suffix=tar.gz"
tar zxvf ./GeoLite2-Country.tar.gz -C .
mkdir dist
mv ./GeoLite2-Country_*/GeoLite2-Country.mmdb ./dist/Country.mmdb
- name: Upload Release
uses: softprops/action-gh-release@v2
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
files: dist/Country.mmdb
tag_name: ${{steps.tag.outputs.result}}
- name: Upload to release branch
uses: crazy-max/ghaction-github-pages@v4
with:
target_branch: release
build_dir: dist
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

View File

@ -1,3 +1,7 @@
# maxmind-geoip # maxmind-geoip
https://blog.maxmind.com/2019/12/18/significant-changes-to-accessing-and-using-geolite2-databases/ https://blog.maxmind.com/2019/12/18/significant-changes-to-accessing-and-using-geolite2-databases/
# License
This repository includes [GeoLite2](https://dev.maxmind.com/geoip/geoip2/geolite2/) data created by [MaxMind](https://www.maxmind.com).