-
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
8 changed files
with
132 additions
and
33 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
name: build container | ||
run-name: building container | ||
on: | ||
workflow_dispatch: | ||
jobs: | ||
build: | ||
runs-on: ${{ matrix.os }} | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
os: | ||
- ubuntu-24.04 | ||
steps: | ||
- name: Check out repository code | ||
uses: actions/checkout@v4 | ||
- name: Run podman build - base | ||
run: | | ||
podman build -t ghcr.io/gbraad-redhat/fedora-bootc-example/fedora:latest \ | ||
--build-arg=BASE_IMAGE="quay.io/fedora/fedora" \ | ||
-f containers/Containerfile . | ||
- name: Push image to ghcr.io - base | ||
run: | | ||
podman push --creds=${{ github.actor }}:${{ secrets.GITHUB_TOKEN }} \ | ||
ghcr.io/gbraad-redhat/fedora-bootc-example/fedora:latest |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
name: build container (bootc) | ||
run-name: building container (bootc) | ||
on: | ||
workflow_dispatch: | ||
jobs: | ||
build: | ||
runs-on: ${{ matrix.os }} | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
os: | ||
- ubuntu-24.04 | ||
steps: | ||
- name: Check out repository code | ||
uses: actions/checkout@v4 | ||
- name: Run podman build - base | ||
run: | | ||
podman build -t ghcr.io/gbraad-redhat/fedora-bootc-example/fedora-bootc:latest \ | ||
--build-arg=BASE_IMAGE="quay.io/fedora/fedora-bootc" \ | ||
-f containers/Containerfile . | ||
- name: Push image to ghcr.io - base | ||
run: | | ||
podman push --creds=${{ github.actor }}:${{ secrets.GITHUB_TOKEN }} \ | ||
ghcr.io/gbraad-redhat/fedora-bootc-example/fedora-bootc:latest |
This file was deleted.
Oops, something went wrong.
5 changes: 3 additions & 2 deletions
5
.github/workflows/build-image.yml → .github/workflows/build-image-release.yml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,76 @@ | ||
name: build disk image (upload) | ||
run-name: build disk image (upload) | ||
on: | ||
workflow_dispatch: | ||
|
||
env: | ||
IMAGE_NAME: ghcr.io/gbraad-redhat/fedora-bootc-example/fedora-bootc:latest | ||
DISK_TYPE: qcow2 | ||
ROOTFS: xfs | ||
ARCH: amd64 | ||
BIB_IMAGE: quay.io/centos-bootc/bootc-image-builder:latest | ||
BODY: "Fedora base bootc image" | ||
|
||
jobs: | ||
build: | ||
name: Build qcow2 image | ||
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: | | ||
# use custom basetemp here because /var/tmp is on a smaller disk | ||
# than /mnt | ||
sudo mkdir -p /mnt/var/tmp/bib-tests | ||
# on GH runners /mnt has 70G free space, use that for our container | ||
# storage | ||
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: Build image | ||
id: build-image | ||
run: | | ||
mkdir -p ./output | ||
sed -e 's;@@IMAGE@@;${{ env.IMAGE_NAME }};g' config.toml.in > config.toml | ||
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 }} | ||
- name: Upload image | ||
uses: actions/upload-artifact@v4 | ||
with: | ||
name: disk | ||
path: | | ||
./output/qcow2/disk.qcow2 | ||
retention-days: 5 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,4 @@ | ||
Fedora base (Bootable) Containers | ||
================================= | ||
Fedora (Bootable) Containers example | ||
==================================== | ||
|
||
Merged into the main Fedora images | ||
https://github.com/gbraad-devenv/fedora | ||
"From `Containerfile` to Virtual Machine" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +0,0 @@ | ||
[customizations.installer.kickstart] | ||
contents = """ | ||
|
||
%post | ||
bootc switch --mutate-in-place --transport registry @@IMAGE@@ | ||
%end | ||
""" | ||
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters