@@ -147,15 +147,18 @@ jobs:
147
147
148
148
- name : Get current version
149
149
id : labels
150
- shell : bash
151
- run : |
152
- set -eo pipefail
153
- ver=$(skopeo inspect docker://quay.io/${{ env.SOURCE_ORG }}/${{ env.SOURCE_IMAGE }}:${{ matrix.major_version }} | jq -r '.Labels["org.opencontainers.image.version"]')
154
- if [ -z "$ver" ] || [ "null" = "$ver" ]; then
155
- echo "inspected image version must not be empty or null"
156
- exit 1
157
- fi
158
- echo "VERSION=$ver" >> $GITHUB_OUTPUT
150
+
151
+ with :
152
+ attempt_limit : 3
153
+ attempt_delay : 15000
154
+ command : |
155
+ set -eo pipefail
156
+ ver=$(skopeo inspect docker://quay.io/${{ env.SOURCE_ORG }}/${{ env.SOURCE_IMAGE }}:${{ matrix.major_version }} | jq -r '.Labels["org.opencontainers.image.version"]')
157
+ if [ -z "$ver" ] || [ "null" = "$ver" ]; then
158
+ echo "inspected image version must not be empty or null"
159
+ exit 1
160
+ fi
161
+ echo "SOURCE_IMAGE_VERSION=$ver" >> $GITHUB_ENV
159
162
160
163
# Generate image metadata
161
164
- name : Image Metadata
@@ -166,7 +169,7 @@ jobs:
166
169
${{ env.IMAGE_NAME }}
167
170
labels : |
168
171
org.opencontainers.image.title=${{ env.IMAGE_NAME }}
169
- org.opencontainers.image.version=${{ steps.labels.outputs.VERSION }}
172
+ org.opencontainers.image.version=${{ env.SOURCE_IMAGE_VERSION }}
170
173
org.opencontainers.image.description=A base Universal Blue ${{ matrix.image_name }} image with batteries included
171
174
io.artifacthub.package.readme-url=https://raw.githubusercontent.com/${{ github.repository }}/main/README.md
172
175
io.artifacthub.package.logo-url=https://avatars.githubusercontent.com/u/120078124?s=200&v=4
@@ -201,20 +204,24 @@ jobs:
201
204
string : ${{ env.IMAGE_REGISTRY }}
202
205
203
206
- name : Push To GHCR
204
- uses : redhat-actions/push-to-registry@v2
207
+
205
208
id : push
206
209
if : github.event_name != 'pull_request'
207
210
env :
208
211
REGISTRY_USER : ${{ github.actor }}
209
212
REGISTRY_PASSWORD : ${{ github.token }}
210
213
with :
211
- image : ${{ steps.build_image.outputs.image }}
212
- tags : ${{ steps.build_image.outputs.tags }}
213
- registry : ${{ steps.registry_case.outputs.lowercase }}
214
- username : ${{ env.REGISTRY_USER }}
215
- password : ${{ env.REGISTRY_PASSWORD }}
216
- extra-args : |
217
- --disable-content-trust
214
+ action : redhat-actions/push-to-registry@v2
215
+ attempt_limit : 3
216
+ attempt_delay : 15000
217
+ with : |
218
+ image: ${{ steps.build_image.outputs.image }}
219
+ tags: ${{ steps.build_image.outputs.tags }}
220
+ registry: ${{ steps.registry_case.outputs.lowercase }}
221
+ username: ${{ env.REGISTRY_USER }}
222
+ password: ${{ env.REGISTRY_PASSWORD }}
223
+ extra-args: |
224
+ --disable-content-trust
218
225
219
226
- name : Login to GitHub Container Registry
220
227
uses : docker/login-action@v3
0 commit comments