-
Notifications
You must be signed in to change notification settings - Fork 24
55 lines (48 loc) · 1.52 KB
/
build-images.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
name: Build images
on:
push:
pull_request:
workflow_dispatch:
# 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
env:
TMP: '/scratch'
jobs:
print_event:
name: print github event
runs-on: ubuntu-latest
steps:
- name: dump github context
run: echo ${{ toJson(github) }}
build_images:
name: Build images
# TODO test this works...
#runs-on: [self-hosted, Linux, X64, kvm]
runs-on: ${{ github.repository.name == 'go-debos/debos-recipes' && '[self-hosted, Linux, X64, kvm]' || 'ubuntu-latest' }}
container:
image: ghcr.io/go-debos/debos:main
options: >-
--device=/dev/kvm
--security-opt label=disable
--cap-add=SYS_PTRACE
--tmpfs /scratch:exec
steps:
- name: Checkout repository
uses: actions/checkout@v2
- 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@v2
with:
name: rpi64
path: out/
if-no-files-found: error