Skip to content

kernel-only-one

kernel-only-one #5

name: kernel-only-one
on:
workflow_dispatch:
inputs:
board:
description: 'Board to build'
required: true
default: 'tritium-h3'
branch:
description: 'Branch to build'
required: true
default: 'edge'
variant:
description: 'Variant to build'
required: true
default: ''
jobs:
"Kernel":
if: ${{ !cancelled() }}
strategy:
fail-fast: false # let other jobs try to complete if one fails
matrix:
include:
- board: "${{ github.event.inputs.board }}"
branch: "${{ github.event.inputs.branch }}"
runner_tags: [ "self-hosted", "Linux", 'armbian', "artifact-kernel" ]
variant: "${{ github.event.inputs.variant }}"
runs-on: "${{ matrix.runner_tags }}"
name: "${{ matrix.board }} ${{ matrix.branch }} (${{ matrix.variant }})"
env:
BOARD: "${{ matrix.board }}"
BRANCH: "${{ matrix.branch }}"
VARIANT: "${{ matrix.variant }}"
#OCI_TARGET_BASE: "ghcr.io/${{ github.repository }}/" # This is picked up by the Docker launcher automatically
DOCKER_ARMBIAN_BASE_COORDINATE_PREFIX: "ghcr.io/${{ github.repository }}:armbian-next-" # Use Docker image in same repo
DOCKER_SKIP_UPDATE: "yes" # Do not apt update/install/requirements/etc during Dockerfile build, trust DOCKER_ARMBIAN_BASE_COORDINATE_PREFIX's images are up-to-date
steps:
# Login to ghcr.io, for later uploading rootfs to ghcr.io
- name: Docker Login to GitHub Container Registry
uses: docker/login-action@v2
with:
registry: ghcr.io
username: ${{ github.repository_owner }} # GitHub username or org
password: ${{ secrets.GITHUB_TOKEN }} # GitHub actions builtin token. repo has to have pkg access.
- name: Checkout build repo
uses: actions/checkout@v3 # We don't need to clone git, really. A wget would suffice for GH-hosted runners. But using clone is better for Igor-hosted runners.
with:
repository: ${{ github.repository_owner }}/armbian-build
ref: extensions
fetch-depth: 0 # fetch all history; much faster for self-hosted runners
clean: false # true is default. it *will* delete the hosts /dev if mounted inside.
- name: Build Kernel ${{env.BOARD}}:${{env.BRANCH}} (variant ${{env.VARIANT}})
id: kernel
run: |
# BRANCH and BOARD are in the env, but Docker doesn't know that; (sudo has --preserve-env). So we need to pass them as args.
# let VARIANT expand
# SHARE_LOG=yes to share logs to pastebin
bash ./compile.sh kernel \
"BRANCH=${{env.BRANCH}}" "BOARD=${{env.BOARD}}" ${{env.VARIANT}} \
SHARE_LOG=yes rpardini-generic UPLOAD_TO_OCI_ONLY=yes
- name: "Logs: ${{ steps.kernel.outputs.logs_url }}"
run: |
echo "Logs: ${{ steps.kernel.outputs.logs_url }}"