ci-hub-support-pusher #5
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: ci-hub-support-pusher | |
on: | |
workflow_run: | |
workflows: | |
- ci-hub-support-builder | |
types: | |
- completed | |
jobs: | |
push: | |
name: push | |
if: ${{ github.event.workflow_run.conclusion == 'success' }} | |
runs-on: ubuntu-24.04 | |
permissions: | |
contents: read | |
packages: write | |
steps: | |
- name: Download ci-hub-support assets | |
uses: actions/download-artifact@v4 | |
with: | |
name: ci-hub-support | |
run-id: ${{ github.event.workflow_run.id }} | |
github-token: ${{ github.token }} | |
- name: Get ci-hub-support build informaiton | |
run: | | |
echo "source_event=$(cat ci-hub-support-build-event)" >> "$GITHUB_ENV" | |
echo "image=$(cat ci-hub-support-image)" >> "$GITHUB_ENV" | |
- name: Log in to ghcr.io | |
if: ${{ env.source_event == 'pull_request' }} | |
uses: redhat-actions/podman-login@v1 | |
with: | |
registry: ghcr.io | |
username: ${{ github.actor }} | |
password: ${{ secrets.GITHUB_TOKEN }} | |
- name: Log in quay.io | |
if: ${{ env.source_event == 'push' }} | |
uses: redhat-actions/podman-login@v1 | |
with: | |
registry: quay.io | |
username: ${{ secrets.QUAY_IO_USERNAME }} | |
password: ${{ secrets.QUAY_IO_PASSWORD }} | |
- name: Push ci-hub-support | |
run: | | |
podman load -i ci-hub-support.tar | |
podman push ${{ env.image }} | |