From 0bbe867cad8adf14dc2b1a17e2151a52c49a4a96 Mon Sep 17 00:00:00 2001 From: Simon L Date: Tue, 6 Jun 2023 13:43:06 +0200 Subject: [PATCH] Fix talk-update workflow and improve imaginary one Signed-off-by: Simon L --- .github/workflows/imaginary-update.yml | 2 +- .github/workflows/talk.yml | 2 +- Containers/imaginary/Dockerfile | 5 ++++- Containers/talk-recording/Dockerfile | 4 +++- 4 files changed, 9 insertions(+), 4 deletions(-) diff --git a/.github/workflows/imaginary-update.yml b/.github/workflows/imaginary-update.yml index 7a7ad083..8732c952 100644 --- a/.github/workflows/imaginary-update.yml +++ b/.github/workflows/imaginary-update.yml @@ -19,7 +19,7 @@ jobs: | cut -f1 \ | tail -1 )" - sed -i "s|go install github.com/h2non/imaginary.*;|go install github.com/h2non/imaginary@$imaginary_version;|" ./Containers/imaginary/Dockerfile + sed -i "s|^ENV IMAGINARY_HASH.*|ENV IMAGINARY_HASH $imaginary_version|" ./Containers/imaginary/Dockerfile - name: Create Pull Request uses: peter-evans/create-pull-request@v5 diff --git a/.github/workflows/talk.yml b/.github/workflows/talk.yml index cf85cd1f..ed3d5dae 100644 --- a/.github/workflows/talk.yml +++ b/.github/workflows/talk.yml @@ -21,7 +21,7 @@ jobs: | grep -E "^v[0-9]+\.[0-9]+\.[0-9]+$" \ | tail -1 )" - sed -i "s|git clone --recursive https://github.com/nextcloud/spreed --branch .* /src; \\\|git clone --recursive https://github.com/nextcloud/spreed --depth=1 --single-branch --branch $spreed_version /src; \\\|" ./Containers/talk-recording/Dockerfile + sed -i "s|^ENV RECORDING_VERSION.*|ENV RECORDING_VERSION $spreed_version|" ./Containers/talk-recording/Dockerfile curl -L "https://raw.githubusercontent.com/nextcloud/spreed/$spreed_version/recording/server.conf.in" -o Containers/talk-recording/recording.conf # Signaling diff --git a/Containers/imaginary/Dockerfile b/Containers/imaginary/Dockerfile index caa473d5..45c59744 100644 --- a/Containers/imaginary/Dockerfile +++ b/Containers/imaginary/Dockerfile @@ -1,4 +1,7 @@ FROM golang:1.20.4-alpine3.17 as go + +ENV IMAGINARY_HASH b632dae8cc321452c3f85bcae79c580b1ae1ed84 + RUN set -ex; \ apk add --no-cache \ vips-dev \ @@ -7,7 +10,7 @@ RUN set -ex; \ vips-jxl \ vips-poppler \ build-base; \ - go install github.com/h2non/imaginary@b632dae8cc321452c3f85bcae79c580b1ae1ed84; + go install github.com/h2non/imaginary@"$IMAGINARY_HASH"; FROM alpine:3.17.3 RUN set -ex; \ diff --git a/Containers/talk-recording/Dockerfile b/Containers/talk-recording/Dockerfile index aef501ab..807d8e78 100644 --- a/Containers/talk-recording/Dockerfile +++ b/Containers/talk-recording/Dockerfile @@ -2,6 +2,8 @@ FROM python:3.11.3-alpine3.18 COPY --chmod=775 start.sh /start.sh +ENV RECORDING_VERSION v16.0.3 + RUN set -ex; \ apk add --no-cache \ ca-certificates \ @@ -22,7 +24,7 @@ RUN set -ex; \ useradd -d /tmp --system recording; \ # Give root a random password echo "root:$(openssl rand -base64 12)" | chpasswd; \ - git clone --recursive https://github.com/nextcloud/spreed --depth=1 --single-branch --branch v16.0.3 /src; \ + git clone --recursive https://github.com/nextcloud/spreed --depth=1 --single-branch --branch "$RECORDING_VERSION" /src; \ mv -v /src/recording/pyproject.toml /src/recording/src/pyproject.toml; \ python3 -m pip install /src/recording/src; \ rm -rf /src; \