Skip to content
Merged
Changes from all commits
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
16 changes: 12 additions & 4 deletions .github/workflows/qcom-container-build-and-upload.yml
Original file line number Diff line number Diff line change
Expand Up @@ -86,11 +86,19 @@ jobs:
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}

- name: Show matching images
shell: bash
run: |
docker image ls --format '{{.Repository}}:{{.Tag}}' \
| grep -E "^ghcr.io/${{ env.QCOM_ORG_NAME }}/${{ env.IMAGE_NAME }}:(fedora|rhel|redhat|centos)\..*$" || true

- name: Upload RPM Images
# Only upload on trusted events that land code on main
if: ${{ github.event_name == 'schedule' || github.event_name == 'push' || github.event_name == 'workflow_dispatch' }}
shell: bash
run: |
for image in $(docker image ls | grep -oiE "ghcr.io/${{env.QCOM_ORG_NAME}}/${{env.IMAGE_NAME}}:(fedora|rhel|redhat|centos)\.[^\s]*"); do
docker push ${image}
done
docker image ls --format '{{.Repository}}:{{.Tag}}' \
| grep -E "^ghcr.io/${{ env.QCOM_ORG_NAME }}/${{ env.IMAGE_NAME }}:(fedora|rhel|redhat|centos)\..*$" \
| while read -r image; do
echo "Pushing $image"
docker push "$image"
done
Loading