Skip to content

Commit

Permalink
feat: add Docker meta-ubi job to workflow
Browse files Browse the repository at this point in the history
- 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: 陳鈞 <[email protected]>
  • Loading branch information
jim60105 committed Dec 2, 2023
1 parent 128d06e commit 23ff158
Showing 1 changed file with 20 additions and 0 deletions.
20 changes: 20 additions & 0 deletions .github/workflows/docker_publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down Expand Up @@ -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

0 comments on commit 23ff158

Please sign in to comment.