name: Build and Push Alpine Image 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 Winter Access Git Registry uses: docker/login-action@v3 with: registry: docker.io username: aprimediet password: ${{ secrets.DOCKER_TOKEN }} - name: Build and push 5.6 Images uses: docker/build-push-action@v5 with: context: . file: Dockerfile.alpine build-args: | PHP_VERSION=5.6 REGISTRY_URL=aprimediet push: true tags: | aprimediet/php-fpm-nginx:5.6 aprimediet/php-fpm-nginx:5.6-alpine - name: Build and push 7.2 Images uses: docker/build-push-action@v5 with: context: . file: Dockerfile.alpine build-args: | PHP_VERSION=7.2 REGISTRY_URL=aprimediet push: true tags: | aprimediet/php-fpm-nginx:7.2 aprimediet/php-fpm-nginx:7.2-alpine - name: Build and push 7.3 Images uses: docker/build-push-action@v5 with: context: . file: Dockerfile.alpine build-args: | PHP_VERSION=7.3 REGISTRY_URL=aprimediet push: true tags: | aprimediet/php-fpm-nginx:7.3 aprimediet/php-fpm-nginx:7.3-alpine - name: Build and push 7.4 Images uses: docker/build-push-action@v5 with: context: . file: Dockerfile.alpine build-args: | PHP_VERSION=7.4 REGISTRY_URL=aprimediet push: true tags: | aprimediet/php-fpm-nginx:7.4 aprimediet/php-fpm-nginx:7.4-alpine - name: Build and push 8.0 Images uses: docker/build-push-action@v5 with: context: . file: Dockerfile.alpine build-args: | PHP_VERSION=8.0 REGISTRY_URL=aprimediet push: true tags: | aprimediet/php-fpm-nginx:8.0 aprimediet/php-fpm-nginx:8.0-alpine - name: Build and push 8.1 Images uses: docker/build-push-action@v5 with: context: . file: Dockerfile.alpine build-args: | PHP_VERSION=8.1 REGISTRY_URL=aprimediet push: true tags: | aprimediet/php-fpm-nginx:8.1 aprimediet/php-fpm-nginx:8.1-alpine - name: Build and push 8.2 Images uses: docker/build-push-action@v5 with: context: . file: Dockerfile.alpine build-args: | PHP_VERSION=8.2 REGISTRY_URL=aprimediet push: true tags: | aprimediet/php-fpm-nginx:8.2 aprimediet/php-fpm-nginx:8.2-alpine - name: Build and push 8.3 Images uses: docker/build-push-action@v5 with: context: . file: Dockerfile.alpine build-args: | PHP_VERSION=8.3 REGISTRY_URL=aprimediet push: true tags: | aprimediet/php-fpm-nginx:8.3-alpine aprimediet/php-fpm-nginx:latest-alpine