draft: commit created to test the component builder workflow #115
Workflow file for this run
This file contains hidden or 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: "Component Builder Check" | |
| on: | |
| pull_request: | |
| paths: | |
| - 'containers/fedora/**' | |
| # Allows you to run this workflow manually from the Actions tab | |
| workflow_dispatch: | |
| jobs: | |
| guest-fedora-amd64: | |
| runs-on: ubuntu-latest | |
| env: | |
| FEDORA_IMAGE: Fedora-Cloud-Base-Generic-41-1.4.x86_64.qcow2 | |
| FEDORA_VERSION: 41 | |
| CPU_ARCH: amd64 | |
| FULL_EMULATION: "true" | |
| DEBIAN_FRONTEND: noninteractive | |
| steps: | |
| - name: Check out code | |
| uses: actions/checkout@v6 | |
| - name: Install dependencies for VM build | |
| run: | | |
| sudo apt-get update | |
| sudo apt-get install -y \ | |
| qemu-system-x86 \ | |
| libvirt-daemon-system \ | |
| virtinst cloud-image-utils \ | |
| libguestfs-tools | |
| - name: Tweak hosted runner to enable 'virt-sysprep' | |
| # https://bugs.launchpad.net/ubuntu/+source/linux/+bug/759725 | |
| run: sudo chmod 0644 /boot/vmlinuz* | |
| - name: Fetch base Fedora image | |
| working-directory: ./containers/fedora | |
| run: wget "https://download.fedoraproject.org/pub/fedora/linux/releases/41/Cloud/x86_64/images/${{ env.FEDORA_IMAGE }}" | |
| - name: Install uv | |
| uses: astral-sh/setup-uv@v7 | |
| with: | |
| version: "0.9.24" | |
| - name: Create VM | |
| working-directory: ./containers/fedora | |
| env: | |
| PYTHONPATH: ${{ github.workspace }} | |
| NO_SECRETS: "true" | |
| run: ./build.sh | |
| - name: Save container image as tarball | |
| env: | |
| local_repository: "localhost/fedora" | |
| remote_repository: "quay.io/openshift-cnv/qe-cnv-tests-fedora-staging" | |
| arch_tag: "${{ env.FEDORA_VERSION }}-${{ env.CPU_ARCH }}" | |
| run: | | |
| mkdir -p artifacts | |
| podman tag "${local_repository}":"${arch_tag}" "${remote_repository}":"${arch_tag}" | |
| podman save -o artifacts/fedora-image-${{ env.CPU_ARCH }}.tar "${remote_repository}":"${arch_tag}" | |
| echo "Saved image to artifacts/fedora-image-${{ env.CPU_ARCH }}.tar" | |
| - name: Upload container image artifact | |
| uses: actions/upload-artifact@v6 | |
| with: | |
| name: fedora-container-image-${{ env.CPU_ARCH }} | |
| path: artifacts/fedora-image-${{ env.CPU_ARCH }}.tar | |
| retention-days: 5 | |
| compression-level: 0 |