Create build-test-image-docker.yml

This commit is contained in:
Igor Pečovnik
2021-12-22 12:37:46 +01:00
committed by GitHub
parent b3e93f99c1
commit 226e191e5a

View File

@@ -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=""