diff --git a/.github/workflows/build-oci.yaml b/.github/workflows/build-oci.yaml index 6b0a036..f4ee059 100644 --- a/.github/workflows/build-oci.yaml +++ b/.github/workflows/build-oci.yaml @@ -9,8 +9,8 @@ on: branches: [ main ] jobs: - snc-runner-oci: - name: snc-runner-oci + build-snc-runner-oci: + name: build-snc-runner-oci runs-on: ubuntu-24.04 steps: - name: Checkout code @@ -19,25 +19,50 @@ jobs: - name: Build image for PR if: ${{ github.event_name == 'pull_request' }} shell: bash + env: + SNC_RUNNER: ghcr.io/crc-org/ci-definitions + SNC_RUNNER_V: pr-${{ github.event.number }} run: | - SNC_RUNNER=ghcr.io/crc-org/ci-definitions SNC_RUNNER_V=pr-${{ github.event.number }} make build-snc-runner-oci + make build-snc-runner-oci + podman save -o snc-runner.tar ${SNC_RUNNER}:${SNC_RUNNER_V} + + - name: Upload image for PR + uses: actions/upload-artifact@v4 + with: + name: snc-runner + path: snc-runner.tar build-crc-builder-oci: name: build-crc-builder-oci runs-on: ubuntu-24.04 steps: - - name: Checkout code - uses: actions/checkout@v4 + - name: Checkout code + uses: actions/checkout@v4 - - name: Prepare runner - shell: bash - run: | - sudo apt-get install -y qemu-user-static + - name: Prepare runner + shell: bash + run: | + sudo apt-get install -y qemu-user-static - - name: Build image for PR - if: ${{ github.event_name == 'pull_request' }} - shell: bash - run: | - CRC_BUILDER=ghcr.io/crc-org/ci-definitions CRC_BUILDER_V=pr-${{ github.event.number }} make build-crc-builder-oci + - name: Build images for PR + if: ${{ github.event_name == 'pull_request' }} + shell: bash + env: + CRC_BUILDER: ghcr.io/crc-org/ci-definitions + CRC_BUILDER_V: pr-${{ github.event.number }} + run: | + make build-crc-builder-oci + # crc-builder creates 3 images (1 per platform) + podman save -o crc-builder-linux.tar ${CRC_BUILDER}:${CRC_BUILDER_V}-linux + podman save -o crc-builder-windows.tar ${CRC_BUILDER}:${CRC_BUILDER_V}-windows + podman save -o crc-builder-darwin.tar ${CRC_BUILDER}:${CRC_BUILDER_V}-darwin + + - name: Upload image for PR + if: ${{ github.event_name == 'pull_request' }} + uses: actions/upload-artifact@v4 + with: + name: crc-builder + path: *.tar + \ No newline at end of file