-
Notifications
You must be signed in to change notification settings - Fork 0
63 lines (54 loc) · 1.69 KB
/
autobuild.yml
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
56
57
58
59
60
61
62
63
name: autobuild
on:
push:
branches:
- master
- 'release/**'
- 'submit/**'
- 'testing/**'
- 'wip/**'
pull_request:
workflow_dispatch:
jobs:
build-all:
strategy:
matrix:
os: [ ubuntu-20.04, ubuntu-22.04 ]
name: on ${{ matrix.os }}
runs-on: ${{ matrix.os }}
timeout-minutes: 1440
steps:
- uses: actions/checkout@v3
- uses: ./.github/actions/setup-worker
# cache apt repo and state, so we don't need full rebuild every time
# note: for different branches, need different name
- name: Cache apt repo and state files
id: cache-repo
uses: actions/cache@v3
with:
path: |
${{ github.workspace }}/.aptrepo
${{ github.workspace }}/.stat
key: repobuild-${{ matrix.os }}+${{ github.ref_name }}@${{ env.CONIFG_HASH }}
restore-keys: |
repobuild-${{ matrix.os }}+${{ github.ref_name }}@${{ env.CONFIG_HASH }}
repobuild-${{ matrix.os }}+${{ github.ref_name }}@
# run the actual builders
- name: Build all base images
run: find cf/repos/ -name "*.yml" -exec "./repo-build-baseimage" "{}" ";"
- name: Run builders
run: |
for scr in ./build.* ; do
if [ -x $scr ]; then
echo "---> Calling builder: $scr"
$scr || exit $?
fi
done
env:
DEBPKG_GITHUB_ANONYMOUS: 1
# upload the generated apt repo as artifact
- name: Archive final apt repo
uses: actions/upload-artifact@v3
with:
name: aptrepo-built-on-${{ matrix.os }}-branch-${{ env.BRANCH_IDENT }}
path: .aptrepo