-
Notifications
You must be signed in to change notification settings - Fork 51
71 lines (62 loc) · 1.97 KB
/
ci-images.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
# Split the image builds into a separate workflow so we can easily run it
# when only the Containerfiles have changed without introducing new external
# GitHub Actions dependencies, such as the `tj-actions/changed-files` action.
name: ci images
on:
pull_request:
paths:
- "**/container-images/**"
push:
branches:
- main
paths:
- "**/container-images/**"
jobs:
build:
runs-on: ubuntu-24.04
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Upgrade to podman 5
run: |
set -e
# Enable universe repository which contains podman
sudo add-apt-repository "deb http://archive.ubuntu.com/ubuntu oracular universe"
# Update package lists
sudo apt-get update
# Install specific podman version
sudo apt-get upgrade
- name: install
shell: bash
run: |
sudo apt-get update
sudo apt-get install podman bash
make install-requirements
- name: Print disk space before cleanup
shell: bash
run: |
df -h
- name: Free Disk Space Linux
shell: bash
run: |
sudo docker rmi "$(docker image ls -aq)" >/dev/null 2>&1 || true
sudo rm -rf \
/usr/share/dotnet /usr/local/lib/android /opt/ghc \
/usr/local/share/powershell /usr/share/swift /usr/local/.ghcup \
/usr/lib/jvm || true
# /mnt has ~ 65 GB free disk space. / is too small.
- name: Reconfigure Docker data-root
run: |
sudo mkdir -p /mnt/docker /etc/docker
echo '{"data-root": "/mnt/docker"}' > /tmp/daemon.json
sudo mv /tmp/daemon.json /etc/docker/daemon.json
cat /etc/docker/daemon.json
sudo systemctl restart docker.service
df -h
- name: Print disk space after cleanup
shell: bash
run: |
df -h
- name: Build Images
run: |
make build