From 9d9854f683820816d15a12aa4a2c0b513cea3c27 Mon Sep 17 00:00:00 2001 From: Marco Franssen Date: Thu, 29 Aug 2024 15:52:16 +0200 Subject: [PATCH] Prepare CI to allow different images Signed-off-by: Marco Franssen --- .github/workflows/images.yaml | 28 ++++++++++++++-------------- Dockerfile => Dockerfile.ci | 0 2 files changed, 14 insertions(+), 14 deletions(-) rename Dockerfile => Dockerfile.ci (100%) diff --git a/.github/workflows/images.yaml b/.github/workflows/images.yaml index 1c6163fe53..ebb5b5ed39 100644 --- a/.github/workflows/images.yaml +++ b/.github/workflows/images.yaml @@ -25,8 +25,8 @@ jobs: strategy: matrix: include: - - name: cilium-cli - dockerfile: ./Dockerfile + - name: cilium-cli-ci + dockerfile: ./Dockerfile.ci steps: - name: Set up Docker Buildx uses: docker/setup-buildx-action@c47758b77c9736f4b2ef4073d4d51994fabfe349 # v3.7.1 @@ -55,46 +55,46 @@ jobs: ref: ${{ steps.tag.outputs.tag }} # main branch or tag pushes - - name: CI Build ${{ matrix.name }} + - name: Build ${{ matrix.name }} if: ${{ github.event_name != 'pull_request_target' }} uses: docker/build-push-action@4f58ea79222b3b9dc2c8bbdd6debcef730109a75 # v6.9.0 - id: docker_build_ci_main + id: docker_build_main with: context: . file: ${{ matrix.dockerfile }} push: true platforms: linux/amd64 tags: | - quay.io/${{ github.repository_owner }}/${{ matrix.name }}-ci:latest - quay.io/${{ github.repository_owner }}/${{ matrix.name }}-ci:${{ steps.tag.outputs.tag }} + quay.io/${{ github.repository_owner }}/${{ matrix.name }}:latest + quay.io/${{ github.repository_owner }}/${{ matrix.name }}:${{ steps.tag.outputs.tag }} - - name: CI Image Releases digests + - name: Image Releases digests if: ${{ github.event_name != 'pull_request_target' }} shell: bash run: | mkdir -p image-digest/ - echo "quay.io/${{ github.repository_owner }}/${{ matrix.name }}-ci:latest@${{ steps.docker_build_ci_main.outputs.digest }}" > image-digest/${{ matrix.name }}.txt - echo "quay.io/${{ github.repository_owner }}/${{ matrix.name }}-ci:${{ steps.tag.outputs.tag }}@${{ steps.docker_build_ci_main.outputs.digest }}" >> image-digest/${{ matrix.name }}.txt + echo "quay.io/${{ github.repository_owner }}/${{ matrix.name }}:latest@${{ steps.docker_build_main.outputs.digest }}" > image-digest/${{ matrix.name }}.txt + echo "quay.io/${{ github.repository_owner }}/${{ matrix.name }}:${{ steps.tag.outputs.tag }}@${{ steps.docker_build_main.outputs.digest }}" >> image-digest/${{ matrix.name }}.txt # PR updates - - name: CI Build ${{ matrix.name }} + - name: Build ${{ matrix.name }} if: ${{ github.event_name == 'pull_request_target' }} uses: docker/build-push-action@4f58ea79222b3b9dc2c8bbdd6debcef730109a75 # v6.9.0 - id: docker_build_ci_pr + id: docker_build_pr with: context: . file: ${{ matrix.dockerfile }} push: true platforms: linux/amd64 tags: | - quay.io/${{ github.repository_owner }}/${{ matrix.name }}-ci:${{ steps.tag.outputs.tag }} + quay.io/${{ github.repository_owner }}/${{ matrix.name }}:${{ steps.tag.outputs.tag }} - - name: CI Image Releases digests + - name: Image Releases digests if: ${{ github.event_name == 'pull_request_target' }} shell: bash run: | mkdir -p image-digest/ - echo "quay.io/${{ github.repository_owner }}/${{ matrix.name }}-ci:${{ steps.tag.outputs.tag }}@${{ steps.docker_build_ci_pr.outputs.digest }}" > image-digest/${{ matrix.name }}.txt + echo "quay.io/${{ github.repository_owner }}/${{ matrix.name }}:${{ steps.tag.outputs.tag }}@${{ steps.docker_build_pr.outputs.digest }}" > image-digest/${{ matrix.name }}.txt # Upload artifact digests - name: Upload artifact digests diff --git a/Dockerfile b/Dockerfile.ci similarity index 100% rename from Dockerfile rename to Dockerfile.ci