test single label #15
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Build images | |
on: | |
push: | |
pull_request: | |
workflow_dispatch: | |
# TODO create debos reusable action: https://docs.github.com/en/actions/using-workflows/reusing-workflows#creating-a-reusable-workflow | |
# TODO add all-green job | |
# TODO add dependabot for this ci file | |
# TODO can we fallback to no-fakemachine if running in a fork _OR_ at least add a scheduling timeout ? | |
#jobs: | |
# build: | |
# runs-on: ubuntu-latest | |
# if: github.event_name != "pull_request" || github.event.pull_request.head.repo.full_name == github.event.pull_request.base.repo.full_name | |
# TODO make this a strategy: matrix to build all images in parallel | |
# TODO build ospacks first | |
# TODO see if we can set an env variable early to check if running with KVM or not... | |
# env: | |
# DAY_OF_WEEK: ${{ blah }} | |
# ${{ env.DAY_OF_WEEK == 'Monday' }} | |
# radxa working configuration: | |
# build: | |
# runs-on: ubuntu-latest | |
# - name: Checkout | |
# uses: actions/checkout@v2 | |
# - name: Build image | |
# run: | | |
# docker run --rm --tty --tmpfs /dev/shm:rw,nosuid,nodev,exec,size=4g --user $(id -u) --security-opt label=disable \ | |
# --workdir $PWD --mount "type=bind,source=$PWD,destination=$PWD" --entrypoint ./scripts/build-supported-configuration.sh godebos/debos \ | |
# -b ${{ matrix.BOARD }} -m ${{ matrix.MODEL }} -v ${{ matrix.VARIANT }} | |
env: | |
TMP: '/scratch' | |
jobs: | |
print_event: | |
name: print github event | |
runs-on: ubuntu-latest | |
steps: | |
- name: Dump GitHub context | |
env: | |
GITHUB_CONTEXT: ${{ toJson(github) }} | |
run: echo "$GITHUB_CONTEXT" | |
build_images: | |
name: Build images | |
# TODO check timeout works with scheduling ? | |
# timeout-minutes: 30 | |
# TODO test this works... | |
#runs-on: [self-hosted, Linux, X64, kvm] | |
# TODO i do not think multiple label array works inside preprocessing? | |
#runs-on: ${{ github.repository_owner == 'go-debos' && '[self-hosted, Linux, X64, kvm]' || 'ubuntu-latest' }} | |
runs-on: ${{ github.repository_owner == 'go-debos' && 'kvm' || 'ubuntu-latest' }} | |
container: | |
image: ghcr.io/go-debos/debos:main | |
options: >- | |
${{ github.repository_owner == 'go-debos' && '--device=/dev/kvm' }} | |
--security-opt label=disable | |
--cap-add=SYS_PTRACE | |
--tmpfs /scratch:exec | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v3 | |
- name: Create output directory | |
run: mkdir out | |
- name: Build rpi64 image | |
run: debos --artifactdir=out rpi64/debimage-rpi64.yaml | |
- name: Publish rpi64 artifacts | |
uses: actions/upload-artifact@v3 | |
with: | |
name: rpi64 | |
path: out/ | |
if-no-files-found: error |