Skip to content

Commit 5755cea

Browse files
committed
Corrects Fedora image push action params
1 parent b64f650 commit 5755cea

File tree

1 file changed

+19
-5
lines changed

1 file changed

+19
-5
lines changed

.github/workflows/ghcup.yaml

Lines changed: 19 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -19,22 +19,36 @@ 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 }}" \
2525
| tail -n 1
2626
)
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}"
2841
2942
- name: "Push `ghcup` image to the GitHub Container Registry"
3043
id: "push-ghcup-to-ghcr"
3144
uses: "redhat-actions/push-to-registry@v2"
3245
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 }}"
3449
username: "${{ github.actor }}"
3550
password: "${{ github.token }}"
36-
registry: "ghcr.io/${{ github.repository_owner }}"
3751

3852
- name: "Print image URL."
3953
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 }}"

0 commit comments

Comments
 (0)