From e8ec9cf77306d503f157d66c56911fe0a55baa15 Mon Sep 17 00:00:00 2001 From: Tim Kelty Date: Fri, 14 Apr 2023 11:36:14 -0400 Subject: [PATCH] Remove 7.4 --- .github/workflows/build-and-push.yml | 190 +++++++++++++-------------- 1 file changed, 95 insertions(+), 95 deletions(-) diff --git a/.github/workflows/build-and-push.yml b/.github/workflows/build-and-push.yml index 5e01f10..3673c58 100644 --- a/.github/workflows/build-and-push.yml +++ b/.github/workflows/build-and-push.yml @@ -19,7 +19,7 @@ jobs: strategy: fail-fast: ${{ github.event_name != 'release' }} matrix: - php: ["8.1", "8.0", "7.4"] + php: ["8.1", "8.0"] type: ["php-fpm", "cli"] include: - type: php-fpm @@ -120,97 +120,97 @@ jobs: PHP_VERSION=${{ matrix.php }} build-nginx-images: - name: Build NGINX images - needs: build-php-images - runs-on: ubuntu-latest - strategy: - fail-fast: ${{ github.event_name != 'release' }} - matrix: - php: ["8.1", "8.0", "7.4"] - steps: - - name: Set env - run: | - echo "PROD_IMAGE_REF=craftcms/nginx:${{ matrix.php }}" >> $GITHUB_ENV - echo "DEV_IMAGE_REF=craftcms/nginx:${{ matrix.php }}-dev" >> $GITHUB_ENV - echo "BASE_PROD_IMAGE_TAG=${{ matrix.php }}" >> $GITHUB_ENV - echo "BASE_DEV_IMAGE_TAG=${{ matrix.php }}-dev" >> $GITHUB_ENV - - - name: Check out the repository - uses: actions/checkout@v2 - - - name: Set up QEMU - uses: docker/setup-qemu-action@v1 - - - name: Set up Docker Buildx - uses: docker/setup-buildx-action@v1 - with: - install: true - - - name: Build production image for Snyk test - uses: docker/build-push-action@v2 - with: - context: nginx - push: false - load: true - tags: ${{ env.PROD_IMAGE_REF }} - build-args: | - PHP_VERSION=${{ env.BASE_PROD_IMAGE_TAG }} - - - name: Snyk test production image - uses: snyk/actions/docker@master - env: - SNYK_CFG_ORG: ${{ secrets.SNYK_CFG_ORG }} - SNYK_TOKEN: ${{ secrets.SNYK_TOKEN }} - with: - image: ${{ env.PROD_IMAGE_REF }} - args: --file=nginx/Dockerfile - - - name: Login to Docker Hub - uses: docker/login-action@v1 - if: github.event_name == 'release' - with: - username: ${{ secrets.DOCKERHUB_USERNAME }} - password: ${{ secrets.DOCKERHUB_TOKEN }} - - - name: Build & push production image - uses: docker/build-push-action@v2 - if: github.event_name == 'release' - with: - context: nginx - push: true - platforms: ${{ env.BUILD_PLATFORMS }} - tags: ${{ env.PROD_IMAGE_REF }} - build-args: | - PHP_VERSION=${{ env.BASE_PROD_IMAGE_TAG }} - - - name: Build development image for Snyk test - uses: docker/build-push-action@v2 - with: - context: nginx - push: false - load: true - tags: ${{ env.DEV_IMAGE_REF }} - build-args: | - PHP_VERSION=${{ env.BASE_DEV_IMAGE_TAG }} - NGINX_CONF=dev.default.conf - - - name: Snyk test development image - uses: snyk/actions/docker@master - env: - SNYK_CFG_ORG: ${{ secrets.SNYK_CFG_ORG }} - SNYK_TOKEN: ${{ secrets.SNYK_TOKEN }} - with: - image: ${{ env.DEV_IMAGE_REF }} - args: --file=nginx/Dockerfile - - - name: Build & push development image - uses: docker/build-push-action@v2 - if: github.event_name == 'release' - with: - context: nginx - push: true - platforms: ${{ env.BUILD_PLATFORMS }} - tags: ${{ env.DEV_IMAGE_REF }} - build-args: | - PHP_VERSION=${{ env.BASE_DEV_IMAGE_TAG }} - NGINX_CONF=dev.default.conf + name: Build NGINX images + needs: build-php-images + runs-on: ubuntu-latest + strategy: + fail-fast: ${{ github.event_name != 'release' }} + matrix: + php: ["8.1", "8.0"] + steps: + - name: Set env + run: | + echo "PROD_IMAGE_REF=craftcms/nginx:${{ matrix.php }}" >> $GITHUB_ENV + echo "DEV_IMAGE_REF=craftcms/nginx:${{ matrix.php }}-dev" >> $GITHUB_ENV + echo "BASE_PROD_IMAGE_TAG=${{ matrix.php }}" >> $GITHUB_ENV + echo "BASE_DEV_IMAGE_TAG=${{ matrix.php }}-dev" >> $GITHUB_ENV + + - name: Check out the repository + uses: actions/checkout@v2 + + - name: Set up QEMU + uses: docker/setup-qemu-action@v1 + + - name: Set up Docker Buildx + uses: docker/setup-buildx-action@v1 + with: + install: true + + - name: Build production image for Snyk test + uses: docker/build-push-action@v2 + with: + context: nginx + push: false + load: true + tags: ${{ env.PROD_IMAGE_REF }} + build-args: | + PHP_VERSION=${{ env.BASE_PROD_IMAGE_TAG }} + + - name: Snyk test production image + uses: snyk/actions/docker@master + env: + SNYK_CFG_ORG: ${{ secrets.SNYK_CFG_ORG }} + SNYK_TOKEN: ${{ secrets.SNYK_TOKEN }} + with: + image: ${{ env.PROD_IMAGE_REF }} + args: --file=nginx/Dockerfile + + - name: Login to Docker Hub + uses: docker/login-action@v1 + if: github.event_name == 'release' + with: + username: ${{ secrets.DOCKERHUB_USERNAME }} + password: ${{ secrets.DOCKERHUB_TOKEN }} + + - name: Build & push production image + uses: docker/build-push-action@v2 + if: github.event_name == 'release' + with: + context: nginx + push: true + platforms: ${{ env.BUILD_PLATFORMS }} + tags: ${{ env.PROD_IMAGE_REF }} + build-args: | + PHP_VERSION=${{ env.BASE_PROD_IMAGE_TAG }} + + - name: Build development image for Snyk test + uses: docker/build-push-action@v2 + with: + context: nginx + push: false + load: true + tags: ${{ env.DEV_IMAGE_REF }} + build-args: | + PHP_VERSION=${{ env.BASE_DEV_IMAGE_TAG }} + NGINX_CONF=dev.default.conf + + - name: Snyk test development image + uses: snyk/actions/docker@master + env: + SNYK_CFG_ORG: ${{ secrets.SNYK_CFG_ORG }} + SNYK_TOKEN: ${{ secrets.SNYK_TOKEN }} + with: + image: ${{ env.DEV_IMAGE_REF }} + args: --file=nginx/Dockerfile + + - name: Build & push development image + uses: docker/build-push-action@v2 + if: github.event_name == 'release' + with: + context: nginx + push: true + platforms: ${{ env.BUILD_PLATFORMS }} + tags: ${{ env.DEV_IMAGE_REF }} + build-args: | + PHP_VERSION=${{ env.BASE_DEV_IMAGE_TAG }} + NGINX_CONF=dev.default.conf