armbian-build/.github/workflows/build-docker.yml
2021-11-23 22:37:06 +01:00

38 lines
1.1 KiB
YAML

name: Build Docker Image
on:
# Trigger the workflow on push but only for the main branch
push:
branches:
- master
# Trigger manually
workflow_dispatch:
jobs:
build:
name: Build Docker image
runs-on: ubuntu-latest
if: ${{ github.repository_owner == 'Armbian' }}
steps:
- uses: actions/checkout@v1
- name: Login to GitHub Container Registry
uses: docker/login-action@v1
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.CR_PAT }}
- name: Build Docker image
run: |
sed -i "s/-it --rm/-i --rm/" config/templates/config-docker.conf
touch .ignore_changes
./compile.sh docker BOARD=virtual-qemu BRANCH=current RELEASE=focal BUILD_MINIMAL=yes BUILD_DESKTOP=no KERNEL_ONLY=no KERNEL_CONFIGURE=no COMPRESS_OUTPUTIMAGE=no REPOSITORY_INSTALL="u-boot,kernel,armbian-config,armbian-firmware" JUST_INIT=yes
docker tag armbian:$(cat VERSION) ghcr.io/armbian/build:$(cat VERSION)
- name: Push Docker image
run: docker push ghcr.io/armbian/build:$(cat VERSION)