Skip to content

Commit a63028d

Browse files
authored
Add a new job to Build workflow to generate Docker UBI image (#500)
1 parent e684243 commit a63028d

File tree

1 file changed

+26
-1
lines changed

1 file changed

+26
-1
lines changed

.github/workflows/build.yml

Lines changed: 26 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,7 @@ jobs:
9393
- name: Checkout repository
9494
uses: actions/checkout@0ad4b8fadaa221de15dcec353f45205ec38ea70b # v4.1.4
9595
- name: Docker build
96-
uses: hashicorp/actions-docker-build@2771d60f540373a86cf21177de69624b4de7de69 # v1.5.0
96+
uses: hashicorp/actions-docker-build@11d43ef520c65f58683d048ce9b47d6617893c9a # v2
9797
env:
9898
VERSION: ${{ needs.set-product-version.outputs.product-version }}
9999
GO_VERSION: ${{ needs.build.outputs.go-version }}
@@ -107,3 +107,28 @@ jobs:
107107
dev_tags: |
108108
docker.io/${{ env.DOCKER_HUB_DEV_REPO }}:${{ env.VERSION }}
109109
docker.io/${{ env.DOCKER_HUB_DEV_REPO }}:${{ env.VERSION }}-${{ github.sha }}
110+
111+
build-docker-ubi:
112+
name: Docker build UBI
113+
needs: [build, set-product-version]
114+
runs-on: ubuntu-latest
115+
116+
steps:
117+
- name: Checkout repository
118+
uses: actions/checkout@0ad4b8fadaa221de15dcec353f45205ec38ea70b # v4.1.4
119+
- name: Docker build
120+
uses: hashicorp/actions-docker-build@11d43ef520c65f58683d048ce9b47d6617893c9a # v2
121+
env:
122+
VERSION: ${{ needs.set-product-version.outputs.product-version }}
123+
GO_VERSION: ${{ needs.build.outputs.go-version }}
124+
with:
125+
version: ${{ env.VERSION }}
126+
bin_name: ${{ vars.BIN_NAME }}
127+
target: release-ubi
128+
arch: amd64
129+
tags: |
130+
docker.io/${{ env.DOCKER_HUB_REPO }}:${{ env.VERSION }}-ubi
131+
dev_tags: |
132+
docker.io/${{ env.DOCKER_HUB_DEV_REPO }}:${{ env.VERSION }}-ubi
133+
docker.io/${{ env.DOCKER_HUB_DEV_REPO }}:${{ env.VERSION }}-ubi-${{ github.sha }}
134+
redhat_tag: quay.io/redhat-isv-containers/671273c6fbc31c69e20237c0:${{ env.VERSION }}

0 commit comments

Comments
 (0)