diff options
Diffstat (limited to '.github')
| -rw-r--r-- | .github/workflows/build-disk.yml | 7 | ||||
| -rw-r--r-- | .github/workflows/build-live-installer.yml | 116 |
2 files changed, 120 insertions, 3 deletions
diff --git a/.github/workflows/build-disk.yml b/.github/workflows/build-disk.yml index 1de6c6e..02ef44a 100644 --- a/.github/workflows/build-disk.yml +++ b/.github/workflows/build-disk.yml @@ -20,7 +20,8 @@ on: - main paths: - './disk_config/disk.toml' - - './disk_config/iso.toml' + - './disk_config/iso-kde.toml' + - './disk_config/iso-gnome.toml' - './.github/workflows/build-disk.yml' env: @@ -36,7 +37,7 @@ concurrency: jobs: build: name: Build disk images - runs-on: ${{ inputs.platform == 'amd64' && 'ubuntu-24.04' || 'ubuntu-24.04-arm' }} + runs-on: ${{ inputs.platform == 'arm64' && 'ubuntu-24.04-arm' || 'ubuntu-24.04' }} strategy: fail-fast: false matrix: @@ -82,7 +83,7 @@ jobs: uses: osbuild/bootc-image-builder-action@30960621b85c9e76c653082f9ef4cab5a10210d5 # main with: builder-image: ${{ env.BIB_IMAGE }} - config-file: ${{ matrix.disk-type == 'anaconda-iso' && './disk_config/iso.toml' || './disk_config/disk.toml' }} + config-file: ${{ matrix.disk-type == 'anaconda-iso' && './disk_config/iso-kde.toml' || './disk_config/disk.toml' }} image: ${{ env.IMAGE_REGISTRY }}/${{ env.IMAGE_NAME }}:${{ env.DEFAULT_TAG }} chown: ${{ env.USER_UID }}:${{ env.USER_GID }} types: ${{ matrix.disk-type }} diff --git a/.github/workflows/build-live-installer.yml b/.github/workflows/build-live-installer.yml new file mode 100644 index 0000000..870699e --- /dev/null +++ b/.github/workflows/build-live-installer.yml @@ -0,0 +1,116 @@ +name: Build live installer + +on: + workflow_dispatch: + inputs: + image_tag: + description: "AeroCore image tag to install" + required: false + default: latest + type: string + workflow_call: + push: + branches: + - main + paths: + - "installer/**" + - "just_scripts/build-live-installer.sh" + - ".github/workflows/build-live-installer.yml" + +permissions: {} + +concurrency: + group: ${{ github.workflow }}-${{ github.ref || github.run_id }} + cancel-in-progress: true + +jobs: + build-live-installer: + name: Build KDE live installer + runs-on: ubuntu-24.04 + permissions: + contents: read + packages: read + + env: + IMAGE_REGISTRY: ghcr.io/${{ github.repository_owner }} + IMAGE_TAG: ${{ inputs.image_tag || 'latest' }} + BASE_IMAGE: ghcr.io/ublue-os/bazzite:stable + FEDORA_VERSION: "44" + + steps: + - name: Maximize build space + uses: ublue-os/remove-unwanted-software@cc0becac701cf642c8f0a6613bbdaf5dc36b259e # v9 + with: + remove-codeql: true + + - name: Mount container storage BTRFS loopback + run: | + sudo truncate -s 70G /mnt/podman-storage.img + sudo mkfs.btrfs -f /mnt/podman-storage.img + sudo podman system reset --force + sudo systemctl stop podman.service + sudo mount -o compress-force=zstd:2 /mnt/podman-storage.img /var/lib/containers/storage + sudo systemctl start podman.service + + - name: Checkout + uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7 + + - name: Install just + uses: extractions/setup-just@53165ef7e734c5c07cb06b3c8e7b647c5aa16db3 # v4 + + - name: Prepare image references + run: | + image_name="$(just image_name)" + image_registry="${IMAGE_REGISTRY,,}" + echo "IMAGE_NAME=${image_name,,}" >> "$GITHUB_ENV" + echo "IMAGE_REGISTRY=${image_registry}" >> "$GITHUB_ENV" + + - name: Login to GHCR + run: | + echo '${{ secrets.GITHUB_TOKEN }}' | sudo podman login ghcr.io \ + --username '${{ github.actor }}' --password-stdin + + - name: Pull AeroCore install image + run: | + sudo podman pull "${IMAGE_REGISTRY}/${IMAGE_NAME}:${IMAGE_TAG}" + + - name: Build live installer payload + run: | + sudo podman build \ + --cap-add sys_admin \ + --security-opt label=disable \ + --build-arg "BASE_IMAGE=${BASE_IMAGE}" \ + --build-arg "INSTALL_IMAGE_PAYLOAD=${IMAGE_REGISTRY}/${IMAGE_NAME}:${IMAGE_TAG}" \ + --tag localhost/aerocore-live-payload:latest \ + --file installer/Containerfile \ + . + + - name: Build ISO + id: build + uses: Zeglius/titanoboa@revamp-pr + with: + arch: x86_64 + image_name: aerocore-live-payload + image_repo: localhost + variant: Kinoite + version: ${{ env.FEDORA_VERSION }} + image_tag: latest + iso_name: aerocore-os-${{ env.IMAGE_TAG }}-amd64.iso + enable_cache_dnf: "false" + enable_cache_skopeo: "false" + enable_flatpak_dependencies: "false" + additional_templates: /github/workspace/installer/lorax_templates/remove_root_password_prompt.tmpl /github/workspace/installer/lorax_templates/set_default_user.tmpl + + - name: Display checksum + run: | + cat "${{ steps.build.outputs.iso_path }}/${{ steps.build.outputs.iso_name }}-CHECKSUM" + + - name: Upload ISO artifact + uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7 + with: + name: aerocore-os-live-installer-${{ env.IMAGE_TAG }} + path: | + ${{ steps.build.outputs.iso_path }}/${{ steps.build.outputs.iso_name }} + ${{ steps.build.outputs.iso_path }}/${{ steps.build.outputs.iso_name }}-CHECKSUM + if-no-files-found: error + compression-level: 0 |
