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