Skip to content

docker-buildimage-geoip2 #85

docker-buildimage-geoip2

docker-buildimage-geoip2 #85

name: docker-buildimage-geoip2
on:
schedule:
- cron: '15 4 * * 0'
push:
branches: [ main ]
paths:
- 'docker/geoip2/**'
- '.github/workflows/docker-buildimage-geoip2.yml'
jobs:
build-image:
runs-on: ubuntu-latest
steps:
-
name: Checkout
uses: actions/checkout@v3
-
name: Set up QEMU
uses: docker/setup-qemu-action@v2
-
name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2
-
name: Login to DockerHub
uses: docker/login-action@v2
with:
username: ${{ secrets.DOCKERHUB_USER }}
password: ${{ secrets.DOCKERHUB_PASSWD }}
- name: Login to DockerHub
uses: docker/login-action@v2
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.PERSONAL_ACCESS_TOKEN }}
-
name: Build and push
uses: docker/build-push-action@v3
with:
context: docker/geoip2/
file: docker/geoip2/Dockerfile
platforms: linux/amd64,linux/arm64/v8
push: true
tags: |
gsmlg/geoip2:latest
ghcr.io/gsmlg/geoip2:latest
build-args: |
LICENSE=${{ secrets.MAXMIND_LICENSE_KEY }}
USER=${{ secrets.GIT_USER_ID }}
TOKEN=${{ secrets.PERSONAL_ACCESS_TOKEN }}
GOPRIVATE=github.com/gsmlg-dev/gsmlg-golang
CGO_ENABLED=0
-
name: Build and push embed
uses: docker/build-push-action@v3
with:
context: docker/geoip2/embed/
file: docker/geoip2/embed/Dockerfile
platforms: linux/amd64,linux/arm64/v8
push: true
tags: |
gsmlg/geoip2:embed
ghcr.io/gsmlg/geoip2:embed
build-args: |
LICENSE=${{ secrets.MAXMIND_LICENSE_KEY }}
USER=${{ secrets.GIT_USER_ID }}
TOKEN=${{ secrets.PERSONAL_ACCESS_TOKEN }}
GOPRIVATE=github.com/gsmlg-dev/gsmlg-golang
CGO_ENABLED=0