name: Build and Push Alpine NGINX Image to docker.io Registry on: push: branches: - master jobs: build: name: Build and push image runs-on: ubuntu-latest container: image: ghcr.io/catthehacker/ubuntu:act-latest steps: - name: Check out repository code uses: actions/checkout@v3 - name: Login to docker.io Registry uses: docker/login-action@v3 with: registry: docker.io username: aprimediet password: ${{ secrets.DOCKER_TOKEN }} - name: Build and push 1.22 uses: docker/build-push-action@v5 with: context: . file: Dockerfile.alpine build-args: | ALPINE_VERSION=3.17 push: true tags: | aprimediet/nginx:1.22-alpine aprimediet/nginx:1.22 - name: Build and push 1.24 uses: docker/build-push-action@v5 with: context: . file: Dockerfile.alpine build-args: | ALPINE_VERSION=3.19 push: true tags: | aprimediet/nginx:1.24-alpine aprimediet/nginx:1.24 - name: Build and push 1.26 uses: docker/build-push-action@v5 with: context: . file: Dockerfile.alpine build-args: | ALPINE_VERSION=3.21 push: true tags: | aprimediet/nginx:1.26-alpine aprimediet/nginx:1.26 aprimediet/nginx:alpine aprimediet/nginx:latest