This repository has been archived by the owner on Aug 6, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 3
117 lines (110 loc) · 4.5 KB
/
repo.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
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
name: Repo
on:
push:
branches: [ "main" ]
pull_request:
branches: [ "main" ]
workflow_dispatch:
jobs:
debian-repo:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
arch: [ amd64, arm64 ]
steps:
- uses: actions/checkout@v4
# Workaround for https://github.com/actions/runner-images/issues/9425, to be removed once the issue is resolved
- name: patch crun (Workaround for https://github.com/actions/runner-images/issues/9425)
run: |
tmpdir="$(mktemp -d)"
pushd "$tmpdir"
if [ "${{ inputs.arch }}" = "amd64" ]; then
curl -Lo ./crun https://github.com/containers/crun/releases/download/1.14.3/crun-1.14.3-linux-amd64
GOOD_SHA=80c5ab9422d4672f650f2bad3da933568349b64117d055486abc3534517be2af
elif [ "${{ inputs.arch }}" = "arm64" ]; then
curl -Lo ./crun https://github.com/containers/crun/releases/download/1.14.3/crun-1.14.3-linux-arm64
GOOD_SHA=0486629e1599c3bccded279f6555ff22691958cde56203ceca099af6f2407263
fi
sha256sum ./crun
OUR_SHA=$(sha256sum ./crun | awk '{ print $1 }')
if [[ "$GOOD_SHA" == "$OUR_SHA" ]]; then
sudo install crun /usr/bin/crun
else
echo "Checksums do not match"
exit 1
fi
popd
rm -rf "$tmpdir"
shell: bash
- name: Show crun version after the patch
shell: bash
run: |
crun --version
- name: Set up QEMU
uses: docker/setup-qemu-action@v3
- name: Build the repo
run: ./build ostreeRepo-${{ matrix.arch }}
working-directory: ./debian
- name: Rename build artifact
run: mv ostreeRepo-${{ matrix.arch }}-trixie*.ostreeRepo.tar.gz ostree-debian-repo-${{ matrix.arch }}.tar.gz
working-directory: ./debian/.build
- name: Upload debian ${{ matrix.arch }} repo
uses: actions/upload-artifact@v3
with:
name: ostree-debian-repo-${{ matrix.arch }}
path: debian/.build/ostree-debian-repo-${{ matrix.arch }}.tar.gz
retention-days: 2
gardenlinux-repo:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
arch: [ amd64, arm64 ]
platform: [ kvm, metal ]
steps:
- uses: actions/checkout@v4
# Workaround for https://github.com/actions/runner-images/issues/9425, to be removed once the issue is resolved
- name: patch crun (Workaround for https://github.com/actions/runner-images/issues/9425)
run: |
tmpdir="$(mktemp -d)"
pushd "$tmpdir"
if [ "${{ inputs.arch }}" = "amd64" ]; then
curl -Lo ./crun https://github.com/containers/crun/releases/download/1.14.3/crun-1.14.3-linux-amd64
GOOD_SHA=80c5ab9422d4672f650f2bad3da933568349b64117d055486abc3534517be2af
elif [ "${{ inputs.arch }}" = "arm64" ]; then
curl -Lo ./crun https://github.com/containers/crun/releases/download/1.14.3/crun-1.14.3-linux-arm64
GOOD_SHA=0486629e1599c3bccded279f6555ff22691958cde56203ceca099af6f2407263
fi
sha256sum ./crun
OUR_SHA=$(sha256sum ./crun | awk '{ print $1 }')
if [[ "$GOOD_SHA" == "$OUR_SHA" ]]; then
sudo install crun /usr/bin/crun
else
echo "Checksums do not match"
exit 1
fi
popd
rm -rf "$tmpdir"
shell: bash
- name: Show crun version after the patch
shell: bash
run: |
crun --version
- name: Set up QEMU
uses: docker/setup-qemu-action@v3
- name: Configure Build Variant
run: echo ${{ matrix.platform }} > features/ostreeRepo/BUILD_VARIANT
working-directory: ./gardenlinux
- name: Build the repo
run: ./build ${{ matrix.platform }}_dev_curl-ostreeRepo-${{ matrix.arch }}
working-directory: ./gardenlinux
- name: Rename build artifact
run: mv ${{ matrix.platform }}*${{ matrix.arch }}*.ostreeRepo.tar.gz ostree-gardenlinux-repo-${{ matrix.platform }}-${{ matrix.arch }}.tar.gz
working-directory: ./gardenlinux/.build
- name: Upload gardenlinux ${{ matrix.platform }} ${{ matrix.arch }} repo
uses: actions/upload-artifact@v3
with:
name: ostree-gardenlinux-repo-${{ matrix.platform }}-${{ matrix.arch }}
path: gardenlinux/.build/ostree-gardenlinux-repo-${{ matrix.platform }}-${{ matrix.arch }}.tar.gz
retention-days: 2