iproxy 0.3.0

Proxy server for IP geolocation. Use external services to get the geolocation of an IP address.
name: Build 📦

on:
  push:
    tags:
      - 'v*.*.*'

env:
  REPOSITORY: docker.io/containerscrew/iproxy

jobs:
  build:
    name: build
    runs-on: ubuntu-latest
    steps:
      - name: Set up QEMU
        uses: docker/setup-qemu-action@v3

      - name: Set up Docker Buildx
        uses: docker/setup-buildx-action@v3

      - name: Login to Docker Hub
        uses: docker/login-action@v3
        with:
          username: ${{ secrets.DOCKERHUB_AUTH_USERNAME }}
          password: ${{ secrets.DOCKERHUB_AUTH_TOKEN }}

      # Step to set Docker tag based on the generated GitHub tag
      - name: Set container tag
        id: set_tag
        run: |
          # Extract the tag name from the full reference
          IMAGE_TAG=$(echo "${{ github.ref }}" | sed 's|.*/||')
          echo "IMAGE_TAG=$IMAGE_TAG" >> "$GITHUB_ENV"

      - name: Build and push
        uses: docker/build-push-action@v6
        with:
          platforms: linux/amd64,linux/arm64
          push: true
          tags: ${{ env.REPOSITORY }}:latest,${{ env.REPOSITORY }}:${{ env.IMAGE_TAG }}