Skip to content

Commit

Permalink
add docker build task (tarxz), clean up tasks?
Browse files Browse the repository at this point in the history
  • Loading branch information
korewaChino committed Oct 27, 2023
1 parent 97dd040 commit 6c89f49
Show file tree
Hide file tree
Showing 7 changed files with 163 additions and 111 deletions.
69 changes: 64 additions & 5 deletions .github/workflows/build-katsu.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
name: Build Live ISO images (with Katsu)
name: Build images (with Katsu)

env:
KATSU_BUILD_TASK_NAME: "Build image"
DNF_PKGS: |
git
xorriso
Expand Down Expand Up @@ -77,7 +78,7 @@ jobs:
popd
- name: Checkout
uses: actions/checkout@v2
- name: Build ISO
- name: ${{ env.KATSU_BUILD_TASK_NAME }}
run: |
pushd katsu
katsu --output=disk-image modules/${{ matrix.variant }}.yaml
Expand All @@ -91,12 +92,70 @@ jobs:
# set github variable
echo artifact=$name >> $GITHUB_ENV
- name: Upload ISO
- name: Upload Artifact
uses: actions/upload-artifact@v3
with:
name: ${{ env.artifact }}-image
path: katsu/katsu-work/image/*.img.xz
docker:
strategy:
fail-fast: false
matrix:
variant:
- base/base-docker-x86_64
- base/base-docker-aarch64
runs-on: ubuntu-latest
container:
image: ghcr.io/terrapkg/builder:f38
# Pass /dev from host to container
# Very hacky, but it works
# Microsoft/Github, if you're reading this,
# I'm sorry.
options: --privileged -v /dev:/dev

steps:
- name: Install dependencies
run: |
dnf install -y $DNF_PKGS
dnf clean all
- name: Set up QEMU
uses: docker/setup-qemu-action@v3
- name: Clone Katsu
uses: actions/checkout@v3
with:
repository: FyraLabs/katsu
ref: main
path: katsu
- name: Build Katsu
run: |
pushd katsu
cargo build --release
cp target/release/katsu /usr/bin/katsu
popd
- name: Checkout
uses: actions/checkout@v2
- name: ${{ env.KATSU_BUILD_TASK_NAME }}
run: |
pushd katsu
katsu --output=fs modules/${{ matrix.variant }}.yaml
# tarball katsu-work/chroot
tar -C katsu-work/chroot -c . | xz -z9 -c > katsu-work/image/katsu.tar.xz
popd
- name: sanitize artifact name
run: |
name=$(echo ${{ matrix.variant }} | sed 's/\//-/g')
# set github variable
echo artifact=$name >> $GITHUB_ENV
- name: Upload Artifact
uses: actions/upload-artifact@v3
with:
name: ${{ env.artifact }}-docker
path: katsu/katsu-work/image/*.tar.xz

live-iso:
strategy:
Expand Down Expand Up @@ -135,7 +194,7 @@ jobs:
popd
- name: Checkout
uses: actions/checkout@v2
- name: Build ISO
- name: ${{ env.KATSU_BUILD_TASK_NAME }}
run: |
pushd katsu
katsu --output=iso modules/${{ matrix.variant }}.yaml
Expand All @@ -148,7 +207,7 @@ jobs:
# set github variable
echo artifact=$name >> $GITHUB_ENV
- name: Upload ISO
- name: Upload Artifact
uses: actions/upload-artifact@v3
with:
name: ${{ env.artifact }}-iso
Expand Down
55 changes: 2 additions & 53 deletions katsu/modules/base/base-disk-aarch64.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ users:

import:
- base.yaml
- base-disk.yaml

scripts:
post:
Expand Down Expand Up @@ -39,56 +40,4 @@ disk:

dnf:
releasever: 39
arch: aarch64
options:
- --setopt=cachedir=/var/cache/dnf
- --nogpgcheck
- --setopt=keepcache=True
exclude:
- fedora-release*
- generic-release*
packages:
- filesystem
- setup
- lvm2
- btrfs-progs
- dmraid
- nvme-cli
- kernel
- glibc
- glibc-common
- dracut-config-generic
- dracut-tools
- dnf
- dracut
# - mkpasswd # maybe not needed soon
- "@core"
- "@standard"
- grub2-tools
- "@hardware-support"
- NetworkManager
- rpm
- libgomp
- ultramarine-release-identity-basic
- ultramarine-release-basic
- fedora-repos
- efibootmgr

arch_packages:
aarch64:
- grub2-efi-aa64
- grub2-efi-aa64-modules
- grub2-efi-aa64-cdboot
- shim-aa64
- shim-unsigned-aarch64
- bcm283x-firmware
- bcm283x-overlays
- "@arm-tools"
x86_64:
- grub2-efi-x64
- grub2-efi-x64-modules
- grub2-efi-x64-cdboot
- grub2-pc
- grub2-pc-modules
- shim-x64
- shim-unsigned-x64
arch: aarch64
55 changes: 2 additions & 53 deletions katsu/modules/base/base-disk-x86_64.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ users:

import:
- base.yaml
- base-disk.yaml

scripts:
post:
Expand Down Expand Up @@ -38,56 +39,4 @@ disk:


dnf:
releasever: 39
options:
- --setopt=cachedir=/var/cache/dnf
- --nogpgcheck
- --setopt=keepcache=True
exclude:
- fedora-release*
- generic-release*
packages:
- filesystem
- setup
- lvm2
- btrfs-progs
- dmraid
- nvme-cli
- kernel
- glibc
- glibc-common
- dracut-config-generic
- dracut-tools
- dnf
- dracut
# - mkpasswd # maybe not needed soon
- "@core"
- "@standard"
- grub2-tools
- "@hardware-support"
- NetworkManager
- rpm
- libgomp
- ultramarine-release-identity-basic
- ultramarine-release-basic
- fedora-repos
- efibootmgr

arch_packages:
aarch64:
- grub2-efi-aa64
- grub2-efi-aa64-modules
- grub2-efi-aa64-cdboot
- shim-aa64
- shim-unsigned-aarch64
- bcm283x-firmware
- bcm283x-overlays
- "@arm-tools"
x86_64:
- grub2-efi-x64
- grub2-efi-x64-modules
- grub2-efi-x64-cdboot
- grub2-pc
- grub2-pc-modules
- shim-x64
- shim-unsigned-x64
releasever: 39
56 changes: 56 additions & 0 deletions katsu/modules/base/base-disk.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
builder: dnf

dnf:
releasever: 39
options:
- --setopt=cachedir=/var/cache/dnf
- --nogpgcheck
- --setopt=keepcache=True
exclude:
- fedora-release*
- generic-release*
packages:
- filesystem
- setup
- lvm2
- btrfs-progs
- dmraid
- nvme-cli
- kernel
- glibc
- glibc-common
- dracut-config-generic
- dracut-tools
- dnf
- dracut
# - mkpasswd # maybe not needed soon
- "@core"
- "@standard"
- grub2-tools
- "@hardware-support"
- NetworkManager
- rpm
- libgomp
- ultramarine-release-identity-basic
- ultramarine-release-basic
- fedora-repos
- efibootmgr

arch_packages:
aarch64:
- grub2-efi-aa64
- grub2-efi-aa64-modules
- grub2-efi-aa64-cdboot
- shim-aa64
- shim-unsigned-aarch64
- bcm283x-firmware
- bcm283x-overlays
- "@arm-tools"
x86_64:
- grub2-efi-x64
- grub2-efi-x64-modules
- grub2-efi-x64-cdboot
- grub2-pc
- grub2-pc-modules
- shim-x64
- shim-unsigned-x64
6 changes: 6 additions & 0 deletions katsu/modules/base/base-docker-aarch64.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
builder: dnf
distro: Ultramarine Linux 39

dnf:
releasever: 39
arch: aarch64
6 changes: 6 additions & 0 deletions katsu/modules/base/base-docker-x86_64.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
builder: dnf
distro: Ultramarine Linux 39

dnf:
releasever: 39
arch: x86_64
27 changes: 27 additions & 0 deletions katsu/modules/base/base-docker.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
builder: dnf

dnf:
releasever: 39
options:
- --setopt=cachedir=/var/cache/dnf
- --nogpgcheck
- --setopt=keepcache=True
exclude:
- fedora-release*
- generic-release*
- kernel*
packages:
- filesystem
- setup
- glibc
- glibc-common
- dnf
# - mkpasswd # maybe not needed soon
- "@core"
- "@hardware-support"
- rpm
- libgomp
- ultramarine-release-identity-basic
- ultramarine-release-basic
- fedora-repos

0 comments on commit 6c89f49

Please sign in to comment.