From c13d2cbda22acdfb2d2b69905316c1f186613222 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ignas=20Vy=C5=A1niauskas?= Date: Thu, 18 Dec 2025 12:35:40 +0200 Subject: [PATCH 1/2] Allow manually triggering a release-disk rebuild via workflow_dispatch This is useful if we are in situation where nothing in the actual release change, but it is the disk building / CI code that changes and we need to re-run the disk build without creating a new release. --- .github/workflows/release-tag.yml | 35 ++++++++++++++++++++++++------- 1 file changed, 27 insertions(+), 8 deletions(-) diff --git a/.github/workflows/release-tag.yml b/.github/workflows/release-tag.yml index 275afb92..08a705ea 100644 --- a/.github/workflows/release-tag.yml +++ b/.github/workflows/release-tag.yml @@ -4,6 +4,16 @@ on: push: tags: - "*" + workflow_dispatch: + inputs: + uploadDiskOnly: + description: | + If enabled, will only re-build and re-upload the release disk, without + creating a new release. Uses the version of PlayOS defined in + application.nix, without verifying that it matches the git tag. + type: boolean + default: false + permissions: contents: write @@ -39,11 +49,18 @@ jobs: - name: Make magic-nix-cache read-only by removing post-build-hook run: sed -i '/post-build-hook = magic-nix-cache-build-hook/d' $HOME/.config/nix/nix.conf + - name: Get version from application.nix + run: | + PLAYOS_VERSION="$(nix eval --raw -f application.nix 'version')" + + echo "PLAYOS_VERSION=$PLAYOS_VERSION" >> $GITHUB_ENV + + - name: Validate tag + if: ${{ inputs.uploadDiskOnly != true }} run: | - app_vsn="$(nix eval --raw -f application.nix 'version')" - if [ "$app_vsn" != "$GITHUB_REF_NAME" ]; then - echo "Git tag ($GITHUB_REF_NAME) does not match version in application.nix ($app_vsn), aborting!" + if [ "$PLAYOS_VERSION" != "$GITHUB_REF_NAME" ]; then + echo "Git tag ($GITHUB_REF_NAME) does not match version in application.nix ($PLAYOS_VERSION), aborting!" exit 1 fi @@ -58,23 +75,25 @@ jobs: aws-region: eu-central-1 - name: Publish to S3 - run: ./.github/workflows/upload-test-disk.sh "$GITHUB_REF_NAME" + run: ./.github/workflows/upload-test-disk.sh "$PLAYOS_VERSION" - name: Create Release summary - run: ./.github/workflows/gen-release-summary.sh "$GITHUB_REF_NAME" > ./release-notes.md + if: ${{ inputs.uploadDiskOnly != true }} + run: ./.github/workflows/gen-release-summary.sh "$PLAYOS_VERSION" > ./release-notes.md - name: Create Release + if: ${{ inputs.uploadDiskOnly != true }} env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} run: | extra_args="" - if [[ "$GITHUB_REF_NAME" == *VALIDATION ]]; then + if [[ "$PLAYOS_VERSION" == *VALIDATION ]]; then extra_args="--prerelease" - elif [[ "$GITHUB_REF_NAME" == *TEST ]]; then + elif [[ "$PLAYOS_VERSION" == *TEST ]]; then extra_args="--draft" fi gh release create --verify-tag \ -F ./release-notes.md \ $extra_args \ - "$GITHUB_REF_NAME" + "$PLAYOS_VERSION" From 7d4b1a61fd50e9fcafe86374d0c2a3aa48a9ddbf Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ignas=20Vy=C5=A1niauskas?= Date: Thu, 18 Dec 2025 09:58:45 +0200 Subject: [PATCH 2/2] Ensure release-validation disk fits RAUC bundle in data In 2023.9.1-DISK, install-playos has hard-coded partition sizes, so we simply modify them in-place. --- installer/install-playos/install-playos.py | 2 +- testing/disk/release.nix | 9 +++++---- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/installer/install-playos/install-playos.py b/installer/install-playos/install-playos.py index b0fa91a1..8b757518 100755 --- a/installer/install-playos/install-playos.py +++ b/installer/install-playos/install-playos.py @@ -13,7 +13,7 @@ from datetime import datetime PARTITION_SIZE_GB_SYSTEM = 9 -PARTITION_SIZE_GB_DATA = 1 +PARTITION_SIZE_GB_DATA = 2 GRUB_CFG = "@grubCfg@" GRUB_ENV = '/mnt/boot/grub/grubenv' diff --git a/testing/disk/release.nix b/testing/disk/release.nix index fa4b7f2f..191b1e0c 100644 --- a/testing/disk/release.nix +++ b/testing/disk/release.nix @@ -12,11 +12,12 @@ with pkgs; with lib; let - # all sizes in MiB + # NOTE: partSizes are hard-coded in install-playos, here only used for + # computing the total diskSizeMiB partSizes = { - boot = 525; # 525 MiB (matches install-playos default) - system = 1024 * 9; # 9 GiB (install-playos default - 1GiB) - data = 400; # 400 MiB (same as testing/disk/default.nix) + boot = 525; # 525 MiB + system = 1000 * 9; # 9 GB + data = 2000; # 2000 MB }; diskSizeMiB = 8 + partSizes."boot" + partSizes."data" + (partSizes."system" * 2) + 1; in