-
Notifications
You must be signed in to change notification settings - Fork 2.4k
126 lines (103 loc) · 3.73 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
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
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 }}