10
10
- ' [2-9][0-9].[0-1][0-9].?[0-3]?[0-9]?'
11
11
12
12
env :
13
- IMAGE_NAME : erhhung/al2023-devops
14
13
IMAGE_LABELS : |
15
14
org.opencontainers.image.authors=Erhhung Yuan <[email protected] >
16
15
@@ -125,8 +124,8 @@ jobs:
125
124
uses : docker/metadata-action@v5
126
125
with :
127
126
images : |
128
- docker.io/${{ env.IMAGE_NAME }}
129
- ghcr.io/${{ env.IMAGE_NAME }}
127
+ docker.io/${{ github.repository }}
128
+ ghcr.io/${{ github.repository }}
130
129
labels : ${{ env.IMAGE_LABELS }}
131
130
132
131
# https://github.com/aws-actions/configure-aws-credentials
@@ -173,7 +172,9 @@ jobs:
173
172
platforms : ${{ matrix.platform }}
174
173
tags : ${{ steps.metadata.outputs.tags }}
175
174
labels : ${{ steps.metadata.outputs.labels }}
176
- outputs : type=image,name=${{ env.IMAGE_NAME }},push-by-digest=true,name-canonical=true,push=true
175
+ cache-from : type=gha,scope=${{ github.repository }}-${{ github.ref_name }}-${{ matrix.platform }}
176
+ cache-to : type=gha,scope=${{ github.repository }}-${{ github.ref_name }}-${{ matrix.platform }}
177
+ outputs : type=image,name=${{ github.repository }},push-by-digest=true,name-canonical=true,push=true
177
178
178
179
# create 0-byte file named /tmp/digests/<digest>
179
180
- name : Export Digest
@@ -223,8 +224,8 @@ jobs:
223
224
uses : docker/metadata-action@v5
224
225
with :
225
226
images : |
226
- docker.io/${{ env.IMAGE_NAME }}
227
- ghcr.io/${{ env.IMAGE_NAME }}
227
+ docker.io/${{ github.repository }}
228
+ ghcr.io/${{ github.repository }}
228
229
labels : ${{ env.IMAGE_LABELS }}
229
230
230
231
# https://github.com/docker/login-action
@@ -250,14 +251,14 @@ jobs:
250
251
working-directory : /tmp/digests
251
252
run : |
252
253
tags=($(jq -cr '[.tags[] | "-t \(.)"] | join(" ")' <<< "$DOCKER_METADATA_OUTPUT_JSON"))
253
- images=($(printf '${{ env.IMAGE_NAME }}@sha256:%s ' *))
254
+ images=($(printf '${{ github.repository }}@sha256:%s ' *))
254
255
docker buildx imagetools create "${tags[@]}" "${images[@]}"
255
256
256
257
# confirm merged image manifests
257
258
- name : Inspect Image
258
259
id : inspect
259
260
run : |
260
- tag="${{ env.IMAGE_NAME }}:$DOCKER_METADATA_OUTPUT_VERSION"
261
+ tag="${{ github.repository }}:$DOCKER_METADATA_OUTPUT_VERSION"
261
262
docker buildx imagetools inspect $tag
262
263
263
264
terminate-runner :
0 commit comments