Skip to content

Commit

Permalink
explicit image
Browse files Browse the repository at this point in the history
Signed-off-by: Jason Madigan <[email protected]>
  • Loading branch information
jasonmadigan committed Dec 18, 2024
1 parent 1935c4f commit a5cc64d
Showing 1 changed file with 26 additions and 6 deletions.
32 changes: 26 additions & 6 deletions .github/workflows/dev-build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,12 @@ on:
workflow_dispatch:

env:
IMAGE_NAME: quay.io/kuadrant/console-plugin
IMAGE_BASE_NAME: kuadrant/console-plugin
REGISTRY: quay.io

jobs:
build:
name: Dev Build from Main
name: Build and Push Multi-Arch Image
runs-on: ubuntu-22.04
strategy:
fail-fast: false
Expand All @@ -31,17 +32,36 @@ jobs:
id: build
uses: redhat-actions/buildah-build@v2
with:
image: ${{ env.IMAGE_NAME }}
image: ${{ env.IMAGE_BASE_NAME }}-${{ matrix.arch }}
tags: latest
archs: ${{ matrix.arch }}
containerfiles: |
./Dockerfile
- name: Push Image
- name: Push Architecture-Specific Image
uses: redhat-actions/push-to-registry@v2
with:
registry: quay.io
registry: ${{ env.REGISTRY }}
username: ${{ secrets.QUAY_USER }}
password: ${{ secrets.QUAY_PASSWORD }}
image: kuadrant/console-plugin
image: ${{ env.IMAGE_BASE_NAME }}-${{ matrix.arch }}
tags: latest

manifest:
name: Create and Push Multi-Arch Manifest
needs: build
runs-on: ubuntu-22.04
steps:
- name: Install Buildah
run: sudo apt-get update && sudo apt-get install -y buildah

- name: Create Manifest
run: |
buildah manifest create ${{ env.REGISTRY }}/${{ env.IMAGE_BASE_NAME }}:latest
buildah manifest add ${{ env.REGISTRY }}/${{ env.IMAGE_BASE_NAME }}:latest docker://${{ env.REGISTRY }}/${{ env.IMAGE_BASE_NAME }}-amd64:latest
buildah manifest add ${{ env.REGISTRY }}/${{ env.IMAGE_BASE_NAME }}:latest docker://${{ env.REGISTRY }}/${{ env.IMAGE_BASE_NAME }}-arm64:latest
- name: Push Multi-Arch Manifest
run: |
buildah manifest push --all ${{ env.REGISTRY }}/${{ env.IMAGE_BASE_NAME }}:latest docker://${{ env.REGISTRY }}/${{ env.IMAGE_BASE_NAME }}:latest \
--creds=${{ secrets.QUAY_USER }}:${{ secrets.QUAY_PASSWORD }}

0 comments on commit a5cc64d

Please sign in to comment.