Skip to content

MaxMind GeoIP Update #324

MaxMind GeoIP Update

MaxMind GeoIP Update #324

name: MaxMind GeoIP Update
on:
workflow_dispatch:
schedule:
- cron: '0 13 */3 * *'
jobs:
maxmind_geoip_update:
timeout-minutes: ${{ fromJSON(vars.BE_JOB_TIMEOUT || vars.DEFAULT_JOB_TIMEOUT) }}
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v6
- name: MaxMind GeoIP Update
uses: docker://ghcr.io/maxmind/geoipupdate:v7.1.1
env:
GEOIPUPDATE_ACCOUNT_ID: ${{ secrets.MAXMIND_ACCOUNT_ID }}
GEOIPUPDATE_LICENSE_KEY: ${{ secrets.MAXMIND_LICENSE_KEY }}
GEOIPUPDATE_EDITION_IDS: "GeoLite2-Country GeoLite2-City"
GEOIPUPDATE_VERBOSE: 1
GEOIPUPDATE_DB_DIR: "/github/workspace"
- name: MaxMind Compress files
run: |
gzip -c GeoLite2-Country.mmdb > GeoLite2-Country.mmdb.gz
gzip -c GeoLite2-City.mmdb > GeoLite2-City.mmdb.gz
- name: Configure AWS credentials
uses: aws-actions/configure-aws-credentials@v4.2.0
with:
aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }}
aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
aws-region: eu-west-1
- name: Upload files to S3
run: |
aws s3 cp --acl public-read GeoLite2-Country.mmdb.gz s3://frltcs.com/web/GeoLite2-Country.mmdb.gz
aws s3 cp --acl public-read GeoLite2-City.mmdb.gz s3://frltcs.com/web/GeoLite2-City.mmdb.gz