Fix server release CI (#2342)

* Fix server release CI

* Forgot sudo

* Fix netavark download

* Fix netavark installation path

* Install passt

* Fix install passt

* Forgot sudo

* Install python in as build deps while building server docker container
This commit is contained in:
Vítor Vasconcellos 2024-04-17 12:16:51 -03:00 committed by GitHub
parent 533d91a215
commit d639ed49ac
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 22 additions and 6 deletions

View file

@ -30,13 +30,32 @@ jobs:
- name: Update buildah
shell: bash
run: |
set -euxo pipefail
wget -O- 'https://github.com/HeavenVolkoff/buildah-static/releases/latest/download/buildah-amd64.tar.gz' \
| sudo tar -xzf- -C /usr/local/bin
- name: Install netavark
shell: bash
run: |
set -euxo pipefail
sudo mkdir -p /usr/local/lib/podman
sudo wget -O- 'https://github.com/containers/netavark/releases/latest/download/netavark.gz' \
| gunzip | sudo dd status=none of=/usr/local/lib/podman/netavark
sudo chmod +x /usr/local/lib/podman/netavark
- name: Install passt
shell: bash
working-directory: /tmp
run: |
set -euxo pipefail
curl -SsJLO https://passt.top/builds/latest/x86_64/passt_954589b-1_all.deb
sudo dpkg -i passt_954589b-1_all.deb
- name: Determine image name & tag
id: image_info
shell: bash
run: |
set -euxo pipefail
if [ "$GITHUB_EVENT_NAME" == "release" ]; then
IMAGE_TAG="${GITHUB_REF##*/}"
else
@ -54,8 +73,7 @@ jobs:
- name: Build image
id: build-image
# TODO: Change to stable version when available
uses: redhat-actions/buildah-build@c79846fb306beeba490e89fb75d2d1af95831e79
uses: redhat-actions/buildah-build@v2
with:
tags: ${{ steps.image_info.outputs.tag }} ${{ github.event_name == 'release' && 'latest' || 'staging' }}
archs: amd64
@ -69,9 +87,7 @@ jobs:
./apps/server/docker/Dockerfile
- name: Push image to ghcr.io
# TODO: Restore redhat-actions/push-to-registry after PR is merged:
# https://github.com/redhat-actions/push-to-registry/pull/93
uses: Eusebiotrigo/push-to-registry@5acfa470857b62a053884f7214581d55ffeb54ac
uses: redhat-actions/push-to-registry@v2
with:
tags: ${{ steps.build-image.outputs.tags }}
image: ${{ steps.build-image.outputs.image }}

View file

@ -21,7 +21,7 @@ RUN --mount=type=cache,target=/var/cache/apt --mount=type=cache,target=/var/lib/
FROM base as build-base
RUN --mount=type=cache,target=/var/cache/apt --mount=type=cache,target=/var/lib/apt \
apt-get install build-essential git sudo unzip wget curl
apt-get install build-essential git sudo unzip wget curl python3 python-is-python3
RUN wget -qO- https://get.pnpm.io/install.sh | env SHELL=bash PNPM_HOME=/usr/share/pnpm sh -