From 23ff15837103c42456ce5e1db24a04cb9001f934 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=99=B3=E9=88=9E?= Date: Sun, 3 Dec 2023 07:11:38 +0800 Subject: [PATCH] feat: add Docker meta-ubi job to workflow MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - Add Docker meta-ubi job to the workflow - Add step to set up Docker Buildx - Add build and push UBI step to the workflow Signed-off-by: 陳鈞 --- .github/workflows/docker_publish.yml | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/.github/workflows/docker_publish.yml b/.github/workflows/docker_publish.yml index 4e5e42e..2d28464 100644 --- a/.github/workflows/docker_publish.yml +++ b/.github/workflows/docker_publish.yml @@ -37,6 +37,15 @@ jobs: type=ref,event=tag type=raw,value=latest,enable=${{ github.ref == format('refs/heads/{0}', 'master') }} + - name: Docker meta-ubi + id: meta-ubi + uses: docker/metadata-action@v5 + with: + images: ${{ secrets.DOCKERHUB_USERNAME }}/${{ github.event.repository.name }},ghcr.io/${{ github.repository }},quay.io/${{ github.repository }} + # set latest tag for default branch + tags: | + type=raw,value=ubi + - name: Set up Docker Buildx uses: docker/setup-buildx-action@v3 @@ -70,7 +79,18 @@ jobs: uses: docker/build-push-action@v5 with: context: . + file: ./Dockerfile push: true tags: ${{ steps.meta.outputs.tags }} labels: ${{ steps.meta.outputs.labels }} platforms: linux/amd64, linux/arm64 + + - name: Build and push UBI + uses: docker/build-push-action@v5 + with: + context: . + file: ./Dockerfile.ubi + push: true + tags: ${{ steps.meta-ubi.outputs.tags }} + labels: ${{ steps.meta-ubi.outputs.labels }} + platforms: linux/amd64, linux/arm64