File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -19,22 +19,37 @@ jobs:
1919 - name : " Build `ghcup` image."
2020 id : " build-ghcup-image"
2121 run : |
22- image =$(
22+ image_id =$(
2323 ./ghcup/builder.sh \
2424 -a "${{ env.alpine_ver }}" \
25+ -n "ghcup" \
2526 | tail -n 1
2627 )
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}"
2842
2943 - name : " Push `ghcup` image to the GitHub Container Registry"
3044 id : " push-ghcup-to-ghcr"
3145 uses : " redhat-actions/push-to-registry@v2"
3246 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 }}"
3450 username : " ${{ github.actor }}"
3551 password : " ${{ github.token }}"
36- registry : " ghcr.io/${{ github.repository_owner }}"
3752
3853 - name : " Print image URL."
3954 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