Skip to content

Commit

Permalink
Add option to build anaconda-iso and latest tag on ghcr
Browse files Browse the repository at this point in the history
  • Loading branch information
Odilhao committed Oct 28, 2024
1 parent 4a28c04 commit 61e926f
Show file tree
Hide file tree
Showing 3 changed files with 47 additions and 4 deletions.
8 changes: 6 additions & 2 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,5 +26,9 @@ jobs:
- uses: actions/checkout@v4
- name: Build container
run: podman build -t ${{ env.IMAGE_REGISTRY }}/bootc-sway:${{ github.sha }} .
- name: Push Image
run: podman push ${{ env.IMAGE_REGISTRY }}/bootc-sway:${{ github.sha }}
- name: Push Image Github SHA
run: podman push ${{ env.IMAGE_REGISTRY }}/bootc-sway:${{ github.sha }}
- name: Tag Image as Latest
run: podman tag ${{ env.IMAGE_REGISTRY }}/bootc-sway:${{ github.sha }} ${{ env.IMAGE_REGISTRY }}/bootc-sway:latest
- name: Push Latest Image
run: podman push ${{ env.IMAGE_REGISTRY }}/bootc-sway:latest
24 changes: 22 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,8 @@ It's possible to use the file `config.toml` to set the user/password and the ssh

To generate the inital ISO the following command can be used:

Build in qcow format:


```bash
sudo podman run \
Expand All @@ -19,12 +21,30 @@ sudo podman run \
--pull=newer \
--security-opt label=type:unconfined_t \
-v $(pwd)/output:/output \
-v $(pwd)/config.toml:/config.toml:ro
-v /var/lib/containers/storage:/var/lib/containers/storage \
quay.io/centos-bootc/bootc-image-builder:latest \
--local \
--type qcow2 \
--rootfs btrfs \
sway-bootc:latest
ghcr.io/odilhao/bootc-sway:latest
```

Building in anaconta-iso

```bash
sudo podman run \
--rm \
-it \
--privileged \
--pull=newer \
--security-opt label=type:unconfined_t \
-v $(pwd)/output:/output \
-v $(pwd)/config.toml:/config.toml:ro
-v /var/lib/containers/storage:/var/lib/containers/storage \
quay.io/centos-bootc/bootc-image-builder:latest \
--type anaconda-iso \
--rootfs btrfs \
ghcr.io/odilhao/bootc-sway:latest
```

Here I'm using `btrfs` as filesystem, you can switch to `xfs` if necessary,
Expand Down
19 changes: 19 additions & 0 deletions config.toml.example
Original file line number Diff line number Diff line change
Expand Up @@ -3,3 +3,22 @@ name = "user"
password = "password"
key = ""
groups = ["wheel"]


[customizations.installer.kickstart]
contents = """
text --non-interactive
zerombr
network --bootproto=dhcp --device=link --activate --onboot=on

clearpart --all --initlabel
part btrfs.boot --fstype=btrfs --size=1024
part btrfs.main --fstype=btrfs --encrypted --grow --fsoptions="compress=zstd:1,space_cache=v2"

btrfs /boot --label=fedora-boot btrfs.boot
btrfs none --label=fedora-btrfs btrfs.main
btrfs / --subvol --name=root fedora-btrfs
btrfs /var/home --subvol --name=home fedora-btrfs
ostreecontainer --url docker pull ghcr.io/odilhao/bootc-sway:latest

"""

0 comments on commit 61e926f

Please sign in to comment.