-
-
Notifications
You must be signed in to change notification settings - Fork 5
129 lines (115 loc) · 3.98 KB
/
build-diskimages.yaml
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
127
128
129
name: build diskimages (bootc)
run-name: building diskimages (bootc)
on:
workflow_dispatch:
env:
DISK_TYPE: qcow2
ROOTFS: xfs
ARCH: amd64
BIB_IMAGE: quay.io/centos-bootc/bootc-image-builder:latest
BODY: "Fedora disk images"
jobs:
build:
name: Build qcow2 diskimages
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os:
- ubuntu-24.04
steps:
- name: Remove unwanted stuff
uses: gbraad-actions/remove-unwanted@v1
- uses: actions/checkout@v4
- name: Workaround podman issues in GH actions
run: |
# see https://github.com/osbuild/bootc-image-builder/issues/446
sudo rm -rf /var/lib/containers/storage
sudo mkdir -p /etc/containers
echo -e "[storage]\ndriver = \"overlay\"\nrunroot = \"/run/containers/storage\"\ngraphroot = \"/var/lib/containers/storage\"" | sudo tee /etc/containers/storage.conf
- name: Workarounds for GH runner diskspace
run: |
sudo mkdir -p /mnt/var/lib/containers
sudo mount -o bind /mnt/var/lib/containers /var/lib/containers
sudo mkdir /var/lib/containers/storage
- name: Create shared user configuration
run: cat config.toml.in > config.toml
- name: Build image - systemd
id: build-image-systemd
run: |
mkdir -p ./output
sudo podman pull ${{ env.IMAGE_NAME }}
sudo podman run \
--rm \
-it \
--privileged \
--pull=newer \
--security-opt label=type:unconfined_t \
-v ./config.toml:/config.toml:ro \
-v ./output:/output \
-v /var/lib/containers/storage:/var/lib/containers/storage \
${{ env.BIB_IMAGE }} \
--target-arch ${{ env.ARCH }} \
--type ${{ env.DISK_TYPE }} \
--rootfs ${{ env.ROOTFS }} \
--local \
${{ env.IMAGE_NAME }}
env:
IMAGE_NAME: ghcr.io/gbraad-devenv/fedora/systemd-bootc:41
- name: Rename output file - systemd
run: sudo mv ./output/qcow2/disk.qcow2 ./output/qcow2/systemd-disk.qcow2
- name: Build image - rdesktop
id: build-image-rdesktop
run: |
mkdir -p ./output
sudo podman pull ${{ env.IMAGE_NAME }}
sudo podman run \
--rm \
-it \
--privileged \
--pull=newer \
--security-opt label=type:unconfined_t \
-v ./config.toml:/config.toml:ro \
-v ./output:/output \
-v /var/lib/containers/storage:/var/lib/containers/storage \
${{ env.BIB_IMAGE }} \
--target-arch ${{ env.ARCH }} \
--type ${{ env.DISK_TYPE }} \
--rootfs ${{ env.ROOTFS }} \
--local \
${{ env.IMAGE_NAME }}
env:
IMAGE_NAME: ghcr.io/gbraad-devenv/fedora/rdesktop-bootc:41
- name: Rename output file - rdesktop
run: sudo mv ./output/qcow2/disk.qcow2 ./output/qcow2/rdesktop-disk.qcow2
- name: Build image - code-cli
id: build-image-code-cli
run: |
mkdir -p ./output
sudo podman pull ${{ env.IMAGE_NAME }}
sudo podman run \
--rm \
-it \
--privileged \
--pull=newer \
--security-opt label=type:unconfined_t \
-v ./config.toml:/config.toml:ro \
-v ./output:/output \
-v /var/lib/containers/storage:/var/lib/containers/storage \
${{ env.BIB_IMAGE }} \
--target-arch ${{ env.ARCH }} \
--type ${{ env.DISK_TYPE }} \
--rootfs ${{ env.ROOTFS }} \
--local \
${{ env.IMAGE_NAME }}
env:
IMAGE_NAME: ghcr.io/gbraad-devenv/fedora/code-cli-bootc:41
- name: Rename output file - code-cli
run: sudo mv ./output/qcow2/disk.qcow2 ./output/qcow2/code-cli-disk.qcow2
- name: Create a GitHub release
uses: ncipollo/release-action@v1
with:
tag: 41
name: Latest disk images
body: ${{ env.BODY }}
artifacts: "output/bootiso/*.iso,./output/qcow2/*,"