-
Notifications
You must be signed in to change notification settings - Fork 64
142 lines (124 loc) · 4.27 KB
/
latest.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
name: latest-build
on:
schedule:
- cron: '0 0 * * *'
workflow_dispatch:
jobs:
linux:
runs-on: ubuntu-24.04
steps:
- uses: actions/checkout@v4
- 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
sudo apt install aptitude -y >/dev/null 2>&1
- 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
sudo apt-get purge firefox
# Install specific podman version
sudo apt-get upgrade
# /mnt has ~ 65 GB free disk space. / is too small.
- name: Reconfigure Docker data-root
run: |
set -e
sudo mkdir -p /mnt/docker /etc/docker
echo '{"data-root": "/mnt/docker"}' > /tmp/daemon.json
sudo mv /tmp/daemon.json /etc/docker/daemon.json
sudo systemctl restart docker.service
df -h
- name: Docker info
run: docker info
- name: Print disk space after cleanup
shell: bash
run: |
df -h
- name: Build a container for CPU inferencing
run: ./container_build.sh build ramalama
- name: Run a one-line script
run: make test
macos:
runs-on: macos-14
steps:
- uses: actions/checkout@v4
- name: install golang
shell: bash
run: brew install go
- name: Run a one-line script
shell: bash
run: make test
build:
runs-on: ubuntu-24.04
needs: [linux, macos]
steps:
- uses: actions/checkout@v4
with:
ref: 's'
- 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
sudo apt-get purge firefox
# Install specific podman version
sudo apt-get upgrade
- 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
sudo apt install aptitude -y >/dev/null 2>&1
# /mnt has ~ 65 GB free disk space. / is too small.
- name: Reconfigure Docker data-root
run: |
set -e
sudo mkdir -p /mnt/docker /etc/docker
echo '{"data-root": "/mnt/docker"}' > /tmp/daemon.json
sudo mv /tmp/daemon.json /etc/docker/daemon.json
sudo systemctl restart docker.service
df -h
- name: Docker info
run: docker info
- name: Print disk space after cleanup
shell: bash
run: |
df -h
- name: install qemu-user-static
run: |
sudo apt-get update
sudo apt-get install qemu-user-static
- name: Login to Registry
uses: redhat-actions/[email protected]
with:
registry: quay.io
username: ${{ secrets.USERNAME }}
password: ${{ secrets.PASSWORD }}
- name: use buildah to build images for amd and aarch64
uses: redhat-actions/buildah-build@v2
id: build_image
with:
image: quay.io/ramalama/ramalama
tags: latest
containerfiles: |
container-images/ramalama/Containerfile
platforms: linux/amd64, linux/arm64
- name: push images to registry
uses: redhat-actions/[email protected]
with:
image: ramalama/ramalama
tags: latest
registry: quay.io