From 9f4b9046cd9bd23e30bed137f36ad2685cbf1948 Mon Sep 17 00:00:00 2001 From: Troy Havelock Date: Tue, 10 Sep 2024 13:15:32 -0400 Subject: [PATCH 1/4] Updates to Build Image Action --- .../workflows/container-build-and-test.yml | 28 +++++++++---------- 1 file changed, 14 insertions(+), 14 deletions(-) diff --git a/.github/workflows/container-build-and-test.yml b/.github/workflows/container-build-and-test.yml index de25ab72cb7..e315bc00005 100644 --- a/.github/workflows/container-build-and-test.yml +++ b/.github/workflows/container-build-and-test.yml @@ -12,23 +12,23 @@ jobs: - name: Checkout Repo uses: actions/checkout@master - # - name: Set up QEMU - # uses: docker/setup-qemu-action@v3 + - name: Set up QEMU + uses: docker/setup-qemu-action@v3 - # - name: Set up Docker Buildx - # uses: docker/setup-buildx-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_USERNAME }} - # password: ${{ secrets.DOCKERHUB_TOKEN }} + - name: Login to Docker Hub + uses: docker/login-action@v3 + with: + username: ${{ secrets.DOCKERHUB_USERNAME }} + password: ${{ secrets.DOCKERHUB_TOKEN }} - # - name: Build and push - # uses: docker/build-push-action@v5 - # with: - # push: true - # tags: troysnyk/snyk-juice-shop:linux + - name: Build and push + uses: docker/build-push-action@v5 + with: + push: true + tags: troysnyk/snyk-juice-shop:linux - uses: snyk/actions/setup@master - name: Snyk Container Monitor From fb8232297be54550f4b18450343758b027c2cf0d Mon Sep 17 00:00:00 2001 From: Troy Havelock Date: Tue, 10 Sep 2024 13:38:36 -0400 Subject: [PATCH 2/4] Updates to action --- .github/workflows/container-build-and-test.yml | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/.github/workflows/container-build-and-test.yml b/.github/workflows/container-build-and-test.yml index e315bc00005..3c04ff17c2f 100644 --- a/.github/workflows/container-build-and-test.yml +++ b/.github/workflows/container-build-and-test.yml @@ -5,6 +5,9 @@ on: branches: - master +env: + IMAGE_NAME: troysnyk/snyk-juice-shop:linux + jobs: docker: runs-on: ubuntu-latest @@ -24,11 +27,18 @@ jobs: username: ${{ secrets.DOCKERHUB_USERNAME }} password: ${{ secrets.DOCKERHUB_TOKEN }} + - name: Extract metadata + id: meta + uses: docker/metadata-action@v5 + with: + images: ${{ env.IMAGE_NAME }} + - name: Build and push - uses: docker/build-push-action@v5 + uses: docker/build-push-action@v6 with: push: true - tags: troysnyk/snyk-juice-shop:linux + provenance: mode=max + ags: ${{ steps.meta.outputs.tags }} - uses: snyk/actions/setup@master - name: Snyk Container Monitor From 0a6027daf9364ffa2bbc53999e14f3ad99efe792 Mon Sep 17 00:00:00 2001 From: Troy Havelock Date: Tue, 10 Sep 2024 13:39:39 -0400 Subject: [PATCH 3/4] Updates to action --- .github/workflows/container-build-and-test.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/container-build-and-test.yml b/.github/workflows/container-build-and-test.yml index 3c04ff17c2f..c0153de9255 100644 --- a/.github/workflows/container-build-and-test.yml +++ b/.github/workflows/container-build-and-test.yml @@ -38,7 +38,7 @@ jobs: with: push: true provenance: mode=max - ags: ${{ steps.meta.outputs.tags }} + tags: ${{ steps.meta.outputs.tags }} - uses: snyk/actions/setup@master - name: Snyk Container Monitor From ff81cef913902a4a21fa7bad8c2e6d90ab703a89 Mon Sep 17 00:00:00 2001 From: Troy Havelock Date: Tue, 10 Sep 2024 13:55:33 -0400 Subject: [PATCH 4/4] Updates to action --- .github/workflows/container-build-and-test.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/container-build-and-test.yml b/.github/workflows/container-build-and-test.yml index c0153de9255..3a178baa608 100644 --- a/.github/workflows/container-build-and-test.yml +++ b/.github/workflows/container-build-and-test.yml @@ -6,7 +6,7 @@ on: - master env: - IMAGE_NAME: troysnyk/snyk-juice-shop:linux + IMAGE_NAME: troysnyk/snyk-juice-shop jobs: docker: @@ -32,6 +32,7 @@ jobs: uses: docker/metadata-action@v5 with: images: ${{ env.IMAGE_NAME }} + tags: linux - name: Build and push uses: docker/build-push-action@v6