Skip to content

Commit

Permalink
Prepare CI to allow different images
Browse files Browse the repository at this point in the history
Signed-off-by: Marco Franssen <[email protected]>
  • Loading branch information
marcofranssen committed Sep 2, 2024
1 parent 3c247c5 commit 80ead2d
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 14 deletions.
28 changes: 14 additions & 14 deletions .github/workflows/images.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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@988b5a0280414f521da01fcc63a27aeeb4b104db # v3.6.1
Expand Down Expand Up @@ -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@5cd11c3a4ced054e52742c5fd54dca954e0edd85 # v6.7.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@5cd11c3a4ced054e52742c5fd54dca954e0edd85 # v6.7.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
Expand Down
File renamed without changes.

0 comments on commit 80ead2d

Please sign in to comment.