make squashfs quiet #14
This file contains hidden or 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
| name: MariaLinux Builder Workflow | |
| on: | |
| push: | |
| branches: [ "main" ] | |
| pull_request: | |
| branches: [ "main" ] | |
| jobs: | |
| build: | |
| runs-on: self-hosted | |
| steps: | |
| - name: Checkout repository | |
| uses: actions/checkout@v4 | |
| - name: Build Image | |
| run: | | |
| docker run --rm --privileged --network=host \ | |
| -v ${{ github.workspace }}:/workspace \ | |
| -v /catalyst:/var/tmp/catalyst \ | |
| -v /images:/images \ | |
| -v /etc/catalyst:/etc/catalyst \ | |
| marialinux_builder \ | |
| /bin/bash -c 'cd /workspace && \ | |
| # Prepare Repositories | |
| echo "Prepare Repositories" && \ | |
| eselect repository enable guru && \ | |
| eselect repository add fox-overlay git https://github.com/MariaLinux/fox-overlay.git && \ | |
| eselect repository add nix-guix git https://github.com/trofi/nix-guix-gentoo.git && \ | |
| emerge --sync -q -v && \ | |
| # Copy config files | |
| echo "Copy config files" && \ | |
| rm -rf /var/tmp/catalyst/* && \ | |
| mkdir -p /var/tmp/catalyst/config && \ | |
| cp -r amd64/config/stages/* /var/tmp/catalyst/config && \ | |
| # Create snapshot | |
| echo "Create snapshot" && \ | |
| catalyst -s stable && \ | |
| export latest_snapshot=$(find /var/tmp/catalyst/snapshots/ -name "*.sqfs" -type f -printf "%T@ %p\n" | sort -n | tail -1 | cut -d" " -f2-) && \ | |
| export hash=$(echo $latest_snapshot | sed "s|.*gentoo-\([a-f0-9]*\)\.sqfs$|\1|") && \ | |
| # Prepare spec file | |
| echo "Prepare spec file" && \ | |
| mkdir -p /var/tmp/catalyst/builds/default && \ | |
| cp amd64/stage4* /var/tmp/catalyst/builds/default && \ | |
| sed -i "s/@TREEISH@/$hash/g" /var/tmp/catalyst/builds/default/stage4-systemd.spec && \ | |
| export profile_stage3__base_url="https://distfiles.gentoo.org/releases/amd64/autobuilds/current-stage3-amd64-desktop-systemd" && \ | |
| wget --no-verbose -P /var/tmp/catalyst/builds/default ${profile_stage3__base_url}/latest-stage3-amd64-desktop-systemd.txt && \ | |
| export latest_stage3=$(sed -n "/^stage3/s/ .*$//p" /var/tmp/catalyst/builds/default/latest-stage3-amd64-desktop-systemd.txt) && \ | |
| wget --no-verbose -P /var/tmp/catalyst/builds/default ${profile_stage3__base_url}/${latest_stage3} && \ | |
| wget --no-verbose -P /var/tmp/catalyst/builds/default ${profile_stage3__base_url}/${latest_stage3}.sha256 && \ | |
| cd /var/tmp/catalyst/builds/default && \ | |
| sha256sum -c ${latest_stage3}.sha256 && \ | |
| sed -i "s|stage3-amd64-@TIMESTAMP@|${latest_stage3}|g" /var/tmp/catalyst/builds/default/stage4-systemd.spec && \ | |
| sed -i "s|@REPODIR@|/workspace|g" /var/tmp/catalyst/builds/default/stage4-systemd.spec && \ | |
| # Build | |
| echo "Build..." && \ | |
| catalyst -f stage4-systemd.spec && \ | |
| # Create image | |
| cd /images && \ | |
| tar2sqfs -q root__$(date +"%Y-%m-%d-%H%M%S").img < /var/tmp/catalyst/builds/default/stage4-amd64-gnome-systemd.tar.xz && \ | |
| echo "Image created successfully!"' |