File tree 1 file changed +19
-5
lines changed 1 file changed +19
-5
lines changed Original file line number Diff line number Diff line change @@ -19,22 +19,36 @@ jobs:
19
19
- name : " Build `ghcup` image."
20
20
id : " build-ghcup-image"
21
21
run : |
22
- image =$(
22
+ image_id =$(
23
23
./ghcup/builder.sh \
24
24
-a "${{ env.alpine_ver }}" \
25
25
| tail -n 1
26
26
)
27
- echo "::set-output name=image::${image}"
27
+ echo "::set-output name=image_id::${image_id}"
28
+
29
+ image_name=$(
30
+ buildah images --format "{{.Name}}" ${image_id}
31
+ )
32
+
33
+ # NOTE: This parameter expansion drops the leading `localhost/` that
34
+ # `buildah` (and other OCI tools) prepend to local image names.
35
+ echo "::set-output name=image_name::${image_name#*/}"
36
+
37
+ image_tags=$(
38
+ buildah images --format "{{.Tag}}" ${image_id}
39
+ )
40
+ echo "::set-output name=image_tags::${image_tags}"
28
41
29
42
- name : " Push `ghcup` image to the GitHub Container Registry"
30
43
id : " push-ghcup-to-ghcr"
31
44
uses : " redhat-actions/push-to-registry@v2"
32
45
with :
33
- image : " ${{ steps.build-ghcup-image.outputs.image }}"
46
+ image : " ${{ steps.build-ghcup-image.outputs.image_name }}"
47
+ tags : " ${{ steps.build-ghcup-image.outputs.image_tags }}"
48
+ registry : " ghcr.io/${{ github.repository_owner }}"
34
49
username : " ${{ github.actor }}"
35
50
password : " ${{ github.token }}"
36
- registry : " ghcr.io/${{ github.repository_owner }}"
37
51
38
52
- name : " Print image URL."
39
53
run : |
40
- echo "Image pushed to [ ${{ steps.push-ghcup-to-ghcr.outputs.registry-paths }} ] "
54
+ echo "Image pushed to ${{ steps.push-ghcup-to-ghcr.outputs.registry-paths }}"
You can’t perform that action at this time.
0 commit comments