From 226e191e5adae98e04dd68948a9d06a44df6e8af Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Igor=20Pe=C4=8Dovnik?= Date: Wed, 22 Dec 2021 12:37:46 +0100 Subject: [PATCH] Create build-test-image-docker.yml --- .github/workflows/build-test-image-docker.yml | 85 +++++++++++++++++++ 1 file changed, 85 insertions(+) create mode 100644 .github/workflows/build-test-image-docker.yml diff --git a/.github/workflows/build-test-image-docker.yml b/.github/workflows/build-test-image-docker.yml new file mode 100644 index 00000000..3bec799c --- /dev/null +++ b/.github/workflows/build-test-image-docker.yml @@ -0,0 +1,85 @@ +name: Build with Docker +on: + workflow_dispatch: + workflow_call: + +jobs: + gradle: + strategy: + fail-fast: false + matrix: + board: [uefi-arm64,uefi-x86,virtual-qemu] + release: [focal,buster,bullseye,hirsute,jammy] + desktop: [xfce] + + if: ${{ github.repository_owner == 'Armbian' && github.event.workflow_run.conclusion == 'success' }} || github.event_name == 'workflow_dispatch' + name: Variant + runs-on: ubuntu-latest + steps: + + - name: Cache Gradle packages + uses: actions/cache@v2 + env: + cache-name: build-kernel + with: + path: build-kernel + key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ github.run_id }}-linux + restore-keys: | + ${{ runner.os }}-build-${{ env.cache-name }}-${{ github.run_id }}-linux + + - name: Read value + run: | + + echo "SKIP=$(cat build-kernel/skip 2> /dev/null || true)" >> $GITHUB_ENV + echo ${{ env.SKIP }} + + - name: Checkout repository + uses: actions/checkout@v2 + with: + fetch-depth: 0 + repository: armbian/build + path: build + clean: true + + - name: Checkout support scripts + uses: actions/checkout@v2 + with: + fetch-depth: 0 + repository: armbian/scripts + path: scripts + clean: true + + - name: Sync + run: | + + mkdir -p build/userpatches + sudo cp scripts/configs/* build/userpatches/ + + - name: Pull Docker image + run: | + + sudo docker pull ghcr.io/armbian/build:$(cat build/VERSION | sed 's/trunk.*/trunk/')"-$(dpkg --print-architecture)" + + - name: Build test image + run: | + + cd build + export TERM=dumb + sed -i "s/-it --rm/-i --rm/" userpatches/config-docker.conf + sed -i "s/COMPRESS_OUTPUTIMAGE=.*/COMPRESS_OUTPUTIMAGE=\"no\"/" userpatches/lib.config + ./compile.sh docker \ + BETA=yes \ + EXPERT=yes \ + BOARD=${{ matrix.board }} \ + BRANCH=current \ + RELEASE=${{ matrix.release }} \ + BUILD_MINIMAL=no \ + BUILD_DESKTOP=yes \ + KERNEL_ONLY=no \ + KERNEL_CONFIGURE=prebuilt \ + COMPRESS_OUTPUTIMAGE=no \ + IGNORE_UPDATES=yes \ + DESKTOP_ENVIRONMENT_CONFIG_NAME="config_base" \ + DESKTOP_ENVIRONMENT=${{ matrix.desktop }} \ + SKIP_EXTERNAL_TOOLCHAINS=yes \ + DESKTOP_APPGROUPS_SELECTED=""