From f20782c087ebd48db551ed027043a487f397527f Mon Sep 17 00:00:00 2001 From: Claude Date: Fri, 25 Sep 2026 07:08:38 +0000 Subject: [PATCH] =?UTF-8?q?=D0=A1=D0=B1=D0=BE=D1=80=D0=BA=D0=B0=20ISO=20?= =?UTF-8?q?=D0=B1=D1=8B=D0=BB=D0=B0=20=D0=BF=D0=BE=D0=B4=D0=BA=D0=BB=D1=8E?= =?UTF-8?q?=D1=87=D0=B5=D0=BD=D0=B0=20=D0=BA=20Pull=20Request=20=D0=B2=20G?= =?UTF-8?q?itHub=20Actions?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - образ собирается на каждом PR, который меняет image/, first boot или зависимости панели, а не только по тегу v*; - после сборки проверяются загрузочные записи BIOS/UEFI, autoinstall.yaml и меню GRUB; - перед сборкой освобождается место на раннере, устаревшие запуски отменяются; CI можно запустить вручную. Co-Authored-By: Claude Opus 5.5 Claude-Session: https://claude.ai/code/session_019LEUXMcdZo7b87mjkUsPgg --- .github/workflows/ci.yml | 5 +++++ .github/workflows/image.yml | 21 ++++++++++++++++++++- 2 files changed, 25 insertions(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index b6c407f..c8fa03e 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -4,10 +4,15 @@ on: push: branches: [main] pull_request: + workflow_dispatch: permissions: contents: read +concurrency: + group: ci-${{ github.ref }} + cancel-in-progress: true + jobs: test: name: Tests (Python ${{ matrix.python }}) diff --git a/.github/workflows/image.yml b/.github/workflows/image.yml index 0b23b6a..3a1d361 100644 --- a/.github/workflows/image.yml +++ b/.github/workflows/image.yml @@ -3,6 +3,12 @@ name: Build ISO image on: push: tags: ["v*"] + pull_request: + paths: + - "image/**" + - "scripts/virtuality_firstboot.sh" + - "web/requirements.txt" + - ".github/workflows/image.yml" workflow_dispatch: inputs: arch: @@ -14,6 +20,10 @@ on: permissions: contents: read +concurrency: + group: image-${{ github.ref }} + cancel-in-progress: true + jobs: iso: name: ISO ${{ matrix.arch }} @@ -26,13 +36,22 @@ jobs: - uses: actions/checkout@v4 with: fetch-depth: 0 - - run: sudo apt-get update && sudo apt-get install -y xorriso + - run: sudo apt-get update && sudo apt-get install -y xorriso python3-yaml - uses: actions/cache@v4 with: path: .cache/iso key: ubuntu-iso-${{ matrix.arch }}-${{ hashFiles('image/build-iso.sh') }} restore-keys: ubuntu-iso-${{ matrix.arch }}- + - name: Free disk space + run: sudo rm -rf /usr/share/dotnet /usr/local/lib/android /opt/ghc /opt/hostedtoolcache/CodeQL && df -h / - run: make iso ARCH=${{ matrix.arch }} + - name: Check ISO boot records + run: | + iso=$(ls dist/*.iso) + xorriso -indev "$iso" -report_el_torito plain 2>/dev/null | tee /dev/stderr | grep -q "UEFI" + xorriso -osirrox on -indev "$iso" -extract /autoinstall.yaml autoinstall.yaml -extract /boot/grub/grub.cfg grub.cfg + python3 -c "import yaml; d = yaml.safe_load(open('autoinstall.yaml')); assert d['autoinstall']['version'] == 1" + grep -q "Install Virtuality" grub.cfg # Ubuntu server ISOs are larger than the 2 GB GitHub release asset limit, # so images are published as workflow artifacts. - uses: actions/upload-artifact@v4