chore: add crc-builder spec #3
Workflow file for this run
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: oci-builder | |
on: | |
push: | |
branches: [ main ] | |
tags: | |
- '*' | |
pull_request: | |
branches: [ main ] | |
jobs: | |
build-crc-builder-oci: | |
name: build-crc-builder-oci | |
runs-on: ubuntu-24.04 | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v4 | |
- name: Prepare runner | |
shell: bash | |
run: | | |
sudo apt-get install -y qemu-user-static | |
- 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" | |