From 0a7a845ff8464d2c32ad74f2d5e50284b1e5c0ad Mon Sep 17 00:00:00 2001 From: Alessandro Fael Garcia Date: Wed, 21 Feb 2024 17:19:55 +0100 Subject: [PATCH 1/4] Update alpine-mainline.yml --- .github/workflows/alpine-mainline.yml | 47 +++++++++++++++++++++++++-- 1 file changed, 45 insertions(+), 2 deletions(-) diff --git a/.github/workflows/alpine-mainline.yml b/.github/workflows/alpine-mainline.yml index ca5ed32..0424bd3 100644 --- a/.github/workflows/alpine-mainline.yml +++ b/.github/workflows/alpine-mainline.yml @@ -112,10 +112,19 @@ jobs: context: "{{ defaultContext }}:mainline/alpine-slim" tags: ${{ steps.meta.outputs.tags }} labels: ${{ steps.meta.outputs.labels }} - push: ${{ github.event_name != 'pull_request' }} + # push: ${{ github.event_name != 'pull_request' }} + outputs: ${{ github.event_name != 'pull_request' && 'type=registry' || 'type=docker,dest=/tmp/nginxslim.tar' }} # cache-from: type=gha,scope=alpine-slim # cache-to: type=gha,mode=min,scope=alpine-slim + - name: Upload Docker build artifact during local builds + if: ${{ github.event_name != 'pull_request' }} + uses: actions/upload-artifact@5d5d22a31266ced268874388b861e4b58bb5c2f3 # v4.3.1 + with: + name: nginxslim + path: /tmp/nginxslim.tar + retention-days: 1 + - name: Sign Docker Hub Manifest if: ${{ github.event_name != 'pull_request' }} run: | @@ -219,6 +228,18 @@ jobs: type=raw,value=alpine type=raw,value=alpine${{ needs.version.outputs.distro }} + - name: Download artifact + if: ${{ github.event_name != 'pull_request' }} + uses: actions/download-artifact@eaceaf801fd36c7dee90939fad912460b18a1ffe # v4.1.2 + with: + name: nginxslim + path: /tmp + + - name: Load image + if: ${{ github.event_name != 'pull_request' }} + run: | + docker load --input /tmp/nginxslim.tar + - name: Build and push NGINX mainline Alpine image to Amazon ECR Public Gallery, Docker Hub, GitHub Container Registry, and Quay id: build uses: docker/build-push-action@4a13e500e55cf31b7a5d59a38ab2040ab0f42f56 # v5.1.0 @@ -227,10 +248,19 @@ jobs: context: "{{ defaultContext }}:mainline/alpine" tags: ${{ steps.meta.outputs.tags }} labels: ${{ steps.meta.outputs.labels }} - push: ${{ github.event_name != 'pull_request' }} + # push: ${{ github.event_name != 'pull_request' }} + outputs: ${{ github.event_name != 'pull_request' && 'type=registry' || 'type=docker,dest=/tmp/nginxcore.tar' }} # cache-from: type=gha,scope=debian-perl # cache-to: type=gha,mode=min,scope=debian-perl + - name: Upload Docker build artifact during local builds + if: ${{ github.event_name != 'pull_request' }} + uses: actions/upload-artifact@5d5d22a31266ced268874388b861e4b58bb5c2f3 # v4.3.1 + with: + name: nginxcore + path: /tmp/nginxcore.tar + retention-days: 1 + - name: Sign Docker Hub Manifest if: ${{ github.event_name != 'pull_request' }} run: | @@ -334,6 +364,18 @@ jobs: type=raw,value=alpine-perl type=raw,value=alpine${{ needs.version.outputs.distro }}-perl + - name: Download artifact + if: ${{ github.event_name != 'pull_request' }} + uses: actions/download-artifact@eaceaf801fd36c7dee90939fad912460b18a1ffe # v4.1.2 + with: + name: nginxcore + path: /tmp + + - name: Load image + if: ${{ github.event_name != 'pull_request' }} + run: | + docker load --input /tmp/nginxcore.tar + - name: Build and push NGINX mainline perl Alpine image to Amazon ECR Public Gallery, Docker Hub, GitHub Container Registry, and Quay id: build uses: docker/build-push-action@4a13e500e55cf31b7a5d59a38ab2040ab0f42f56 # v5.1.0 @@ -343,6 +385,7 @@ jobs: tags: ${{ steps.meta.outputs.tags }} labels: ${{ steps.meta.outputs.labels }} push: ${{ github.event_name != 'pull_request' }} + # outputs: ${{ github.event_name != 'pull_request' && 'type=registry' || 'type=docker,dest=/tmp/nginxslim.tar' }} # cache-from: type=gha,scope=alpine-perl # cache-to: type=gha,mode=min,scope=alpine-perl From 4bc5c3e20da4d5fc654d34ea36ea29d8fd0674d9 Mon Sep 17 00:00:00 2001 From: Alessandro Fael Garcia Date: Wed, 21 Feb 2024 17:32:27 +0100 Subject: [PATCH 2/4] Update alpine-mainline.yml --- .github/workflows/alpine-mainline.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/alpine-mainline.yml b/.github/workflows/alpine-mainline.yml index 0424bd3..55e67a0 100644 --- a/.github/workflows/alpine-mainline.yml +++ b/.github/workflows/alpine-mainline.yml @@ -113,7 +113,7 @@ jobs: tags: ${{ steps.meta.outputs.tags }} labels: ${{ steps.meta.outputs.labels }} # push: ${{ github.event_name != 'pull_request' }} - outputs: ${{ github.event_name != 'pull_request' && 'type=registry' || 'type=docker,dest=/tmp/nginxslim.tar' }} + outputs: ${{ github.event_name != 'pull_request' && 'type=registry' || 'type=oci,dest=/tmp/nginxslim.tar' }} # cache-from: type=gha,scope=alpine-slim # cache-to: type=gha,mode=min,scope=alpine-slim @@ -249,7 +249,7 @@ jobs: tags: ${{ steps.meta.outputs.tags }} labels: ${{ steps.meta.outputs.labels }} # push: ${{ github.event_name != 'pull_request' }} - outputs: ${{ github.event_name != 'pull_request' && 'type=registry' || 'type=docker,dest=/tmp/nginxcore.tar' }} + outputs: ${{ github.event_name != 'pull_request' && 'type=registry' || 'type=oci,dest=/tmp/nginxcore.tar' }} # cache-from: type=gha,scope=debian-perl # cache-to: type=gha,mode=min,scope=debian-perl @@ -385,7 +385,7 @@ jobs: tags: ${{ steps.meta.outputs.tags }} labels: ${{ steps.meta.outputs.labels }} push: ${{ github.event_name != 'pull_request' }} - # outputs: ${{ github.event_name != 'pull_request' && 'type=registry' || 'type=docker,dest=/tmp/nginxslim.tar' }} + # outputs: ${{ github.event_name != 'pull_request' && 'type=registry' || 'type=oci,dest=/tmp/nginxslim.tar' }} # cache-from: type=gha,scope=alpine-perl # cache-to: type=gha,mode=min,scope=alpine-perl From b5a66f2e8e74c51e09e8a35ec53ef18250e8da84 Mon Sep 17 00:00:00 2001 From: Alessandro Fael Garcia Date: Wed, 21 Feb 2024 18:45:04 +0100 Subject: [PATCH 3/4] Update alpine-mainline.yml --- .github/workflows/alpine-mainline.yml | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/.github/workflows/alpine-mainline.yml b/.github/workflows/alpine-mainline.yml index 55e67a0..763c76a 100644 --- a/.github/workflows/alpine-mainline.yml +++ b/.github/workflows/alpine-mainline.yml @@ -118,7 +118,7 @@ jobs: # cache-to: type=gha,mode=min,scope=alpine-slim - name: Upload Docker build artifact during local builds - if: ${{ github.event_name != 'pull_request' }} + if: ${{ github.event_name == 'pull_request' }} uses: actions/upload-artifact@5d5d22a31266ced268874388b861e4b58bb5c2f3 # v4.3.1 with: name: nginxslim @@ -229,14 +229,14 @@ jobs: type=raw,value=alpine${{ needs.version.outputs.distro }} - name: Download artifact - if: ${{ github.event_name != 'pull_request' }} + if: ${{ github.event_name == 'pull_request' }} uses: actions/download-artifact@eaceaf801fd36c7dee90939fad912460b18a1ffe # v4.1.2 with: name: nginxslim path: /tmp - name: Load image - if: ${{ github.event_name != 'pull_request' }} + if: ${{ github.event_name == 'pull_request' }} run: | docker load --input /tmp/nginxslim.tar @@ -254,7 +254,7 @@ jobs: # cache-to: type=gha,mode=min,scope=debian-perl - name: Upload Docker build artifact during local builds - if: ${{ github.event_name != 'pull_request' }} + if: ${{ github.event_name == 'pull_request' }} uses: actions/upload-artifact@5d5d22a31266ced268874388b861e4b58bb5c2f3 # v4.3.1 with: name: nginxcore @@ -365,14 +365,14 @@ jobs: type=raw,value=alpine${{ needs.version.outputs.distro }}-perl - name: Download artifact - if: ${{ github.event_name != 'pull_request' }} + if: ${{ github.event_name == 'pull_request' }} uses: actions/download-artifact@eaceaf801fd36c7dee90939fad912460b18a1ffe # v4.1.2 with: name: nginxcore path: /tmp - name: Load image - if: ${{ github.event_name != 'pull_request' }} + if: ${{ github.event_name == 'pull_request' }} run: | docker load --input /tmp/nginxcore.tar From e71d1f36dd599161ccf41277b802a7dacdab1e6a Mon Sep 17 00:00:00 2001 From: Alessandro Fael Garcia Date: Wed, 21 Feb 2024 20:13:06 +0100 Subject: [PATCH 4/4] Update alpine-mainline.yml --- .github/workflows/alpine-mainline.yml | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/.github/workflows/alpine-mainline.yml b/.github/workflows/alpine-mainline.yml index 763c76a..3a788c5 100644 --- a/.github/workflows/alpine-mainline.yml +++ b/.github/workflows/alpine-mainline.yml @@ -207,6 +207,18 @@ jobs: username: ${{ secrets.QUAY_USERNAME }} password: ${{ secrets.QUAY_TOKEN }} + - name: Download artifact + if: ${{ github.event_name == 'pull_request' }} + uses: actions/download-artifact@eaceaf801fd36c7dee90939fad912460b18a1ffe # v4.1.2 + with: + name: nginxslim + path: /tmp + + - name: Load image + if: ${{ github.event_name == 'pull_request' }} + run: | + docker load --input /tmp/nginxslim.tar + - name: Extract metadata (tags, labels) for Docker id: meta uses: docker/metadata-action@8e5442c4ef9f78752691e2d8f8d19755c6f78e81 # v5.5.1 @@ -228,18 +240,6 @@ jobs: type=raw,value=alpine type=raw,value=alpine${{ needs.version.outputs.distro }} - - name: Download artifact - if: ${{ github.event_name == 'pull_request' }} - uses: actions/download-artifact@eaceaf801fd36c7dee90939fad912460b18a1ffe # v4.1.2 - with: - name: nginxslim - path: /tmp - - - name: Load image - if: ${{ github.event_name == 'pull_request' }} - run: | - docker load --input /tmp/nginxslim.tar - - name: Build and push NGINX mainline Alpine image to Amazon ECR Public Gallery, Docker Hub, GitHub Container Registry, and Quay id: build uses: docker/build-push-action@4a13e500e55cf31b7a5d59a38ab2040ab0f42f56 # v5.1.0