armbian-build/.github/workflows/build-docker.yml
Igor Pečovnik 36d0bdcaff
Varius updates to CI scripts (#3359)
* RFC u-boot CI to more modern way
2021-12-19 01:02:16 +01:00

77 lines
2.3 KiB
YAML

name: Docker Image
on:
# Trigger the workflow on push but only for the main branch
push:
branches:
- master
# Trigger manually
workflow_dispatch:
jobs:
build-arm64:
name: Build for ARM
runs-on: arm64
if: ${{ github.repository_owner == 'Armbian' }}
steps:
- name: Checkout repository
uses: actions/checkout@v2
with:
fetch-depth: 0
repository: armbian/build
path: build
ref: master
clean: false
- 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: |
cd build
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)-arm64
- name: Push Docker image
run: docker push ghcr.io/armbian/build:$(cat VERSION)-arm64
build-amd64:
name: Build for X86
runs-on: ubuntu-latest
if: ${{ github.repository_owner == 'Armbian' }}
steps:
- name: Checkout repository
uses: actions/checkout@v2
- 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)-amd64
- name: Push Docker image
run: docker push ghcr.io/armbian/build:$(cat VERSION)-amd64