[skip-ci] machine images #94
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: MACHINE IMAGE TRIAL | |
on: | |
pull_request: | |
branches: | |
- main | |
defaults: | |
run: | |
shell: bash -l {0} | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Delete hostedtoolcache | |
run: rm -rf /opt/hostedtoolcache | |
- name: Check out code | |
uses: actions/checkout@v4 | |
- name: Pull coreos-assembler image | |
run: podman pull quay.io/coreos-assembler/coreos-assembler | |
- name: Pull coreos-assembler image | |
run: podman pull quay.io/coreos-assembler/coreos-assembler | |
- name: create fcos work dir | |
run: mkdir ./fcos | |
- name: Cosa init | |
run: | | |
source ./contrib/podman-next/fcos-podmanimage/cosa-snippet | |
cd fcos | |
cosa init --branch podman-next https://github.com/lsm5/fedora-coreos-config | |
- name: Cosa Fetch | |
run: | | |
source ./contrib/podman-next/fcos-podmanimage/cosa-snippet | |
cd fcos | |
cosa fetch --update-lockfile | |
- name: Cosa Build Qcow2 | |
run: | | |
source ./contrib/podman-next/fcos-podmanimage/cosa-snippet | |
cd fcos | |
cosa build | |
- name: Cosa Build Hyperv | |
run: | | |
source ./contrib/podman-next/fcos-podmanimage/cosa-snippet | |
cd fcos | |
cosa buildextend-hyperv | |
- name: Cosa Build Applehv | |
run: | | |
source ./contrib/podman-next/fcos-podmanimage/cosa-snippet | |
cd fcos | |
cosa buildextend-applehv | |
- name: Cosa Compress Qcow2 | |
run: | | |
source ./contrib/podman-next/fcos-podmanimage/cosa-snippet | |
cd fcos | |
cosa compress | |
- name: Get Qcow2 Filename | |
run: echo "QCOW_IMAGE=$(ls ./fcos/builds/latest/x86_64 | grep qcow2.xz)" >> $GITHUB_ENV | |
- name: Create Applehv Containerfile | |
run: echo "APPLEHV_IMAGE=$(ls ./fcos/builds/latest/x86_64 | grep applehv.x86_64.raw.gz)" >> $GITHUB_ENV | |
- name: Create Hyperv Containerfile | |
run: echo "HYPERV_IMAGE=$(ls ./fcos/builds/latest/x86_64 | grep hyperv.x86_64.vhdx.zip)" >> $GITHUB_ENV | |
- name: Build Qcow2 Image | |
uses: redhat-actions/buildah-build@v2 | |
with: | |
base-image: scratch | |
image: machine-images | |
tags: 5.0-qemu | |
archs: x86_64 | |
content: ./fcos/builds/latest/x86_64/${{ env.QCOW_IMAGE }} | |
labels: | | |
org.opencontainers.image.title=fcos-podman-next qcow2 machine image | |
- name: Build Applehv Image | |
uses: redhat-actions/buildah-build@v2 | |
with: | |
base-image: scratch | |
image: machine-images | |
tags: 5.0-applehv | |
archs: x86_64 | |
content: ./fcos/builds/latest/x86_64/${{ env.APPLEHV_IMAGE }} | |
labels: | | |
org.opencontainers.image.title=fcos-podman-next applehv machine image | |
- name: Build Hyperv Image | |
uses: redhat-actions/buildah-build@v2 | |
with: | |
base-image: scratch | |
image: machine-images | |
tags: 5.0-hyperv | |
archs: x86_64 | |
content: ./fcos/builds/latest/x86_64/${{ env.HYPERV_IMAGE }} | |
labels: | | |
org.opencontainers.image.title=fcos-podman-next hyperv machine image | |
- name: podman manifest create | |
run: podman manifest create quay.io/podman/machine-images:5.0 | |
- name: podman manifest add images | |
run: | | |
podman manifest add quay.io/podman/machine-images:5.0 quay.io/podman/machine-images:5.0-applehv | |
podman manifest add quay.io/podman/machine-images:5.0 quay.io/podman/machine-images:5.0-hyperv | |
podman manifest add quay.io/podman/machine-images:5.0 quay.io/podman/machine-images:5.0-qemu | |
- name: Push to Quay | |
uses: redhat-actions/push-to-registry@v2 | |
with: | |
image: machine-images | |
tags: 5.0-applehv 5.0-hyperv 5.0-qemu | |
registry: quay.io/podman | |
username: ${{ secrets.QUAY_PODMAN_USERNAME }} | |
password: ${{ secrets.QUAY_PODMAN_PASSWORD }} |