-
Notifications
You must be signed in to change notification settings - Fork 0
163 lines (147 loc) · 5.15 KB
/
podman.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
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
name: Podman
on:
workflow_dispatch:
push:
branches:
- main
paths:
- .github/workflows/podman.yml
concurrency:
group: ${{ github.workflow }}
cancel-in-progress: true
permissions:
id-token: write
attestations: write
env:
GO_VERSION: 1.23
PODMAN_VERSION: 5.3.2
jobs:
build:
strategy:
fail-fast: false
matrix:
include:
- os: ubuntu-24.04
name: x86_64-unknown-linux-gnu
goos: linux
goarch: amd64
debarch: amd64
glibc: 2.38
- os: ubuntu-24.04-arm
name: aarch64-unknown-linux-gnu
goos: linux
goarch: arm64
debarch: arm64
glibc: 2.38
- os: ubuntu-22.04-arm
name: aarch64-unknown-linux-gnu35
goos: linux
goarch: arm64
debarch: arm64
glibc: 2.35
runs-on: ${{ matrix.os }}
env:
GOOS: ${{ matrix.goos }}
GOARCH: ${{ matrix.goarch }}
steps:
- uses: actions/setup-go@v5
with:
go-version: ${{ env.GO_VERSION }}
- name: Checkout podman source
uses: actions/checkout@v4
with:
repository: containers/podman
ref: v${{ env.PODMAN_VERSION }}
- if: endsWith(matrix.os, '24.04')
run: |
sudo apt update
sudo apt install -y netavark
- if: endsWith(matrix.os, '22.04')
run: |
echo 'deb http://ports.ubuntu.com/ubuntu-ports/ noble universe' | sudo tee /etc/apt/sources.list.d/noble.list
sudo apt update
sudo apt install -y netavark
sudo rm /etc/apt/sources.list.d/noble.list
sudo apt update
- name: Install podman dependencies
run: |
sudo apt install -y \
btrfs-progs \
build-essential \
conmon \
crun \
git \
golang-go \
go-md2man \
iptables \
libapparmor-dev \
libassuan-dev \
libbtrfs-dev \
libc6-dev \
libdevmapper-dev \
libglib2.0-dev \
libgpgme-dev \
libgpg-error-dev \
libprotobuf-dev \
libprotobuf-c-dev \
libseccomp-dev \
libselinux1-dev \
libsystemd-dev \
pkg-config \
uidmap \
zstd
sudo sysctl kernel.unprivileged_userns_clone=1
- run: make BUILDTAGS="apparmor cni seccomp systemd exclude_graphdriver_devicemapper" PREFIX=/usr
- run: mkdir podman-${{ matrix.name }}-${{ env.PODMAN_VERSION }}
- run: make DESTDIR=$(pwd)/podman-${{ matrix.name }}-${{ env.PODMAN_VERSION }} install
- run: tar -caf podman-${{ matrix.name }}-${{ env.PODMAN_VERSION }}.tar.zst podman-${{ matrix.name }}-${{ env.PODMAN_VERSION }}
- name: Make deb
run: |
mkdir -p podman-${{ matrix.name }}-${{ env.PODMAN_VERSION }}/DEBIAN
cat <<EOF > podman-${{ matrix.name }}-${{ env.PODMAN_VERSION }}/DEBIAN/control
Package: podman
Version: ${{env.PODMAN_VERSION}}
Architecture: ${{ matrix.debarch }}
Priority: optional
Section: universe/admin
Maintainer: BES <[email protected]>
Bugs: https://github.com/containers/podman/issues
Depends: conmon, crun | runc, golang-github-containers-common, libc6 (>= ${{ matrix.glibc }}), libdevmapper1.02.1 (>= 2:1.02.97), libseccomp2 (>= 2.5.0), libsqlite3-0 (>= 3.36.0), libsubid4 (>= 1:4.11.1)
Recommends: buildah (>= 1.31), libgpgme11t64 (>= 1.4.1), catatonit | tini | dumb-init, dbus-user-session, passt, slirp4netns, uidmap
Suggests: containers-storage, docker-compose, podman-compose, iptables
Homepage: https://github.com/containers/podman
Description: tool to manage containers and pods
EOF
dpkg-deb --root-owner-group -b podman-${{ matrix.name }}-${{ env.PODMAN_VERSION }}
- uses: actions/attest-build-provenance@v1
with:
subject-path: podman-${{ matrix.name }}-${{ env.PODMAN_VERSION }}.*
- uses: actions/upload-artifact@v4
with:
name: podman-${{ matrix.name }}-${{ env.PODMAN_VERSION }}
path: podman-${{ matrix.name }}-${{ env.PODMAN_VERSION }}.*
if-no-files-found: error
upload:
needs: build
runs-on: ubuntu-latest
permissions:
contents: read
id-token: write # OIDC token for AWS login
steps:
- uses: actions/download-artifact@v4
with:
pattern: podman-*
merge-multiple: true
- name: Configure AWS Credentials
uses: aws-actions/configure-aws-credentials@v4
with:
aws-region: ap-southeast-2
role-to-assume: arn:aws:iam::143295493206:role/gha-tamanu-tools-upload
role-session-name: GHA@3PB=Podman
- name: Upload
run: |
for f in podman-*; do
aws s3 cp $f s3://bes-ops-tools/podman/${{ env.PODMAN_VERSION }}/$f --no-progress
done
- name: Clear cache
run: aws cloudfront create-invalidation --distribution-id=EDAG0UBS1MN74 --paths '/podman/*'