Skip to content

[skip-ci] machine images #89

[skip-ci] machine images

[skip-ci] machine images #89

Workflow file for this run

name: MACHINE IMAGE TRIAL
on:
pull_request:
branches:
- main
jobs:
build:
runs-on: ubuntu-latest
steps:
- 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 }}