Skip to content

Commit 5f2beca

Browse files
committed
ci: Add quay.io to reusable workflow
1 parent b7b616f commit 5f2beca

1 file changed

Lines changed: 33 additions & 0 deletions

File tree

.github/workflows/reusable_build_image.yaml

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,9 @@ on:
3030
harbor-robot-secret:
3131
description: The secret for the Harbor robot user used to push images and manifest
3232
required: true
33+
quay-robot-secret:
34+
description: The secret for the Quay.io robot user used to push images and manifest
35+
required: true
3336
slack-token:
3437
description: The Slack token used to post failure notifications
3538
required: true
@@ -128,6 +131,22 @@ jobs:
128131
image-repository: ${{ inputs.registry-namespace }}/${{ inputs.image-name || inputs.product-name }}
129132
image-manifest-tag: ${{ steps.build.outputs.image-manifest-tag }}
130133
source-image-uri: localhost/${{ inputs.registry-namespace }}/${{ inputs.product-name }}:${{ steps.build.outputs.image-manifest-tag }}
134+
135+
- name: Publish Container Image on quay.io
136+
uses: stackabletech/actions/publish-image@8a8085be0a8cec3d24ad3970e602d65be487da6a # v0.14.1
137+
with:
138+
image-registry-uri: quay.io
139+
image-registry-username: stackable+robot_${{ inputs.registry-namespace }}_github_action_build
140+
image-registry-password: ${{ secrets.quay-robot-secret }}
141+
# NOTE (@NickLarsenNZ): This fallback is just for now so we can support both repo level
142+
# image folders that go under the sdp namespace AND nested image folders that contain the
143+
# namespace (for example precommit/hadoop).
144+
# In future, we probably want to encode this information in the boil config metadata per
145+
# registry so we don't have to do such gymnastics in the workflow.
146+
image-repository: stackable/${{ inputs.registry-namespace }}/${{ inputs.image-name || inputs.product-name }}
147+
image-manifest-tag: ${{ steps.build.outputs.image-manifest-tag }}
148+
source-image-uri: localhost/${{ inputs.registry-namespace }}/${{ inputs.product-name }}:${{ steps.build.outputs.image-manifest-tag }}
149+
131150
publish_manifests:
132151
name: Build/Publish ${{ matrix.versions }} Manifests
133152
needs: [generate_version_dimension, build]
@@ -159,6 +178,20 @@ jobs:
159178
image-repository: ${{ inputs.registry-namespace }}/${{ inputs.image-name || inputs.product-name }}
160179
image-index-manifest-tag: ${{ matrix.versions }}-stackable${{ inputs.sdp-version }}
161180

181+
- name: Publish and Sign Image Index Manifest to quay.io
182+
uses: stackabletech/actions/publish-image-index-manifest@8a8085be0a8cec3d24ad3970e602d65be487da6a # v0.14.1
183+
with:
184+
image-registry-uri: quay.io
185+
image-registry-username: stackable+robot_${{ inputs.registry-namespace }}_github_action_build
186+
image-registry-password: ${{ secrets.quay-robot-secret }}
187+
# NOTE (@NickLarsenNZ): This fallback is just for now so we can support both repo level
188+
# image folders that go under the sdp namespace AND nested image folders that contain the
189+
# namespace (for example precommit/hadoop).
190+
# In future, we probably want to encode this information in the boil config metadata per
191+
# registry so we don't have to do such gymnastics in the workflow.
192+
image-repository: stackable/${{ inputs.registry-namespace }}/${{ inputs.image-name || inputs.product-name }}
193+
image-index-manifest-tag: ${{ matrix.versions }}-stackable${{ inputs.sdp-version }}
194+
162195
notify:
163196
name: Failure Notification
164197
needs: [generate_version_dimension, build, publish_manifests]

0 commit comments

Comments
 (0)