latest-build #91
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 | |
# /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: 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: 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/podman-login@v1.7 | |
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/cpuonly/Containerfile | |
platforms: linux/amd64, linux/arm64 | |
- name: push images to registry | |
uses: redhat-actions/push-to-registry@v2.8 | |
with: | |
image: ramalama/ramalama | |
tags: latest | |
registry: quay.io |