Skip to content
Draft
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Corrects Fedora image push action params
  • Loading branch information
jkachmar committed Oct 3, 2021
commit 5755cea269774205ee2b9f2f7c98f3b119c54f2f
24 changes: 19 additions & 5 deletions .github/workflows/ghcup.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -19,22 +19,36 @@ jobs:
- name: "Build `ghcup` image."
id: "build-ghcup-image"
run: |
image=$(
image_id=$(
./ghcup/builder.sh \
-a "${{ env.alpine_ver }}" \
| tail -n 1
)
echo "::set-output name=image::${image}"
echo "::set-output name=image_id::${image_id}"

image_name=$(
buildah images --format "{{.Name}}" ${image_id}
)

# NOTE: This parameter expansion drops the leading `localhost/` that
# `buildah` (and other OCI tools) prepend to local image names.
echo "::set-output name=image_name::${image_name#*/}"

image_tags=$(
buildah images --format "{{.Tag}}" ${image_id}
)
echo "::set-output name=image_tags::${image_tags}"

- name: "Push `ghcup` image to the GitHub Container Registry"
id: "push-ghcup-to-ghcr"
uses: "redhat-actions/push-to-registry@v2"
with:
image: "${{ steps.build-ghcup-image.outputs.image }}"
image: "${{ steps.build-ghcup-image.outputs.image_name }}"
tags: "${{ steps.build-ghcup-image.outputs.image_tags }}"
registry: "ghcr.io/${{ github.repository_owner }}"
username: "${{ github.actor }}"
password: "${{ github.token }}"
registry: "ghcr.io/${{ github.repository_owner }}"

- name: "Print image URL."
run: |
echo "Image pushed to [ ${{ steps.push-ghcup-to-ghcr.outputs.registry-paths }} ]"
echo "Image pushed to ${{ steps.push-ghcup-to-ghcr.outputs.registry-paths }}"