-
Notifications
You must be signed in to change notification settings - Fork 2.4k
92 lines (75 loc) · 2.59 KB
/
machine-images.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
name: MACHINE IMAGE TRIAL
on:
pull_request:
branches:
- main
jobs:
build:
runs-on: ubuntu-latest
#defaults:
#run:
steps:
- name: Check out code
uses: actions/checkout@v4
- 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
shell: bash -l {0}
run: |
source ./contrib/podman-next/fcos-podmanimage/cosa-snippet
cd fcos
cosa init https://github.com/coreos/fedora-coreos-config
- name: cosa fetch
shell: bash -l {0}
run: |
#source ./contrib/podman-next/fcos-podmanimage/cosa-snippet
cd fcos
cosa fetch
- name: cosa build
shell: bash -l {0}
run: |
#source ./contrib/podman-next/fcos-podmanimage/cosa-snippet
cd fcos
cosa build
#cosa compress
#- name: cosa build applehv
#run: |
#cd fcos
#cosa buildextend-applehv
#- name: cosa build windows
#run: |
#cd fcos
#cosa buildextend-hyperv
- name: compress image
run: |
cd fcos
cosa compress
- name: create qcow2 containerfile
run: |
echo "QCOW_IMAGE=$(ls | grep qcow2.xz)" >> "$GITHUB_ENV"
cat > Containerfile.qcow2 << EOF
FROM scratch
COPY ./builds/latest/x86_64/${{ env.QCOW_IMAGE }} ${{ env.$QCOW_IMAGE }}
EOF
- name: Build FCOS Image with qcow2
id: build_image_multiarch
# Ref: https://github.com/redhat-actions/buildah-build
uses: redhat-actions/buildah-build@v2
with:
image: podman-machine-images
tags: 5.0-qemu
archs: x86_64
containerfiles: Containerfile.qcow2
labels: |
org.opencontainers.image.title=fcos-podman-next qcow2 image
#org.opencontainers.image.source=https://raw.githubusercontent.com/${{ github.repository }}/${{ github.sha }}/contrib/podman-next/fcos-podmanimage/Containerfile
#org.opencontainers.image.url=https://github.com/${{ github.repository }}/actions/runs/${{ github.run_id }}
#org.opencontainers.image.description=FCOS image with rpms from rhcontainerbot/podman-next copr
#org.opencontainers.image.revision=${{ github.sha }}
- name: podman manifest create
run: podman manifest create quay.io/podman/machine-images:5.0
- name: podman manifest add 3 images
run: podman manifest add quay.io/podman/machine-images:5.0 quay.io/podman/machine-images:5.0-qemu
#- name: push 3 images to quay