Skip to content

Commit 946f1a0

Browse files
author
pull clone
committed
Expand bootc-image-builder mounts
1 parent f562ff1 commit 946f1a0

File tree

1 file changed

+31
-11
lines changed

1 file changed

+31
-11
lines changed

.github/workflows/build-disk.yml

Lines changed: 31 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -76,23 +76,43 @@ jobs:
7676
- name: Mount BTRFS for podman storage
7777
if: inputs.platform != 'arm64'
7878
uses: ublue-os/container-storage-action@main
79+
env:
80+
BTRFS_TARGET_DIR: /var/lib/containers/storage
7981

8082
- name: Checkout
8183
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5
8284

8385
- name: Build disk images
8486
id: build
85-
uses: osbuild/[email protected]
86-
with:
87-
config-file: ${{ matrix.disk-type == 'anaconda-iso'
88-
&& './disk_config/iso.toml'
89-
|| './disk_config/disk.toml' }}
90-
image: ${{ env.IMAGE_REGISTRY }}/${{ env.IMAGE_NAME }}:${{ env.DEFAULT_TAG }}
91-
chown: ${{ env.USER_UID }}:${{ env.USER_GID }}
92-
types: ${{ matrix.disk-type }}
93-
additional-args: ${{ matrix.disk-type == 'anaconda-iso'
94-
&& '--use-librepo=True --rootfs btrfs'
95-
|| '--use-librepo=True --rootfs btrfs' }}
87+
shell: bash
88+
run: |
89+
set -euo pipefail
90+
sudo rm -rf ./output
91+
mkdir -p ./output
92+
sudo rm -rf /mnt/osbuild /mnt/var_tmp
93+
sudo mkdir -p /mnt/osbuild /mnt/var_tmp
94+
95+
config_file="./disk_config/disk.toml"
96+
extra_args="--use-librepo=True --rootfs btrfs"
97+
if [[ "${{ matrix.disk-type }}" == "anaconda-iso" ]]; then
98+
config_file="./disk_config/iso.toml"
99+
fi
100+
101+
sudo podman run --rm --privileged \
102+
--security-opt label=type:unconfined_t \
103+
--volume /var/lib/containers/storage:/var/lib/containers/storage \
104+
--volume /mnt/osbuild:/run/osbuild \
105+
--volume /mnt/var_tmp:/var/tmp \
106+
--volume ./output:/output \
107+
--volume "${config_file}:/config.toml:ro" \
108+
quay.io/centos-bootc/bootc-image-builder:latest build \
109+
--output /output \
110+
--chown "${{ env.USER_UID }}:${{ env.USER_GID }}" \
111+
${extra_args} \
112+
--type "${{ matrix.disk-type }}" \
113+
"${{ env.IMAGE_REGISTRY }}/${{ env.IMAGE_NAME }}:${{ env.DEFAULT_TAG }}"
114+
115+
echo "output-directory=$(pwd)/output" >> "$GITHUB_OUTPUT"
96116
97117
98118
- name: Upload disk images and Checksum to Job Artifacts

0 commit comments

Comments
 (0)