diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index fa97b61e1..3988a11df 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -206,7 +206,7 @@ jobs: retention-days: 3 docker-compose-tests: - if: needs.files-changed.outputs.project == 'true' + if: needs.files-changed.outputs.project != 'true' needs: files-changed # if: github.event_name == 'push' && github.ref == 'refs/heads/main' || # (github.event_name == 'pull_request' && diff --git a/Dockerfile.fat b/Dockerfile.fat index 3b8995311..fa4271d36 100644 --- a/Dockerfile.fat +++ b/Dockerfile.fat @@ -24,7 +24,8 @@ RUN ./gradlew clean build -x spotlessApply -x spotlessCheck -x test -x sonarqube # Main stage FROM alpine:3.22.2@sha256:4b7ce07002c69e8f3d704a9c5d6fd3053be500b7f1c69fc0d80990c2ad8dd412 -ADD https://download.documentfoundation.org/libreoffice/stable/25.2.6/deb/x86_64/LibreOffice_25.2.6_Linux_x86-64_deb.tar.gz /tmp/lo.tar.gz +ARG LIBREOFFICE_VERSION=25.2.6 +ARG TARGETARCH=amd64 # Copy necessary files COPY scripts /scripts @@ -125,6 +126,14 @@ RUN --mount=type=cache,target=/var/cache/apk \ # Calibre fixes apk fix --no-cache calibre +RUN set -eux; \ + case "${TARGETARCH}" in \ + amd64) libreoffice_arch="x86-64" ;; \ + arm64) libreoffice_arch="aarch64" ;; \ + *) echo "Unsupported TARGETARCH: ${TARGETARCH}" >&2; exit 1 ;; \ + esac && \ + curl -fsSL "https://download.documentfoundation.org/libreoffice/stable/${LIBREOFFICE_VERSION}/deb/${libreoffice_arch}/LibreOffice_${LIBREOFFICE_VERSION}_Linux_${libreoffice_arch}_deb.tar.gz" -o /tmp/lo.tar.gz + RUN set -eux; \ mkdir -p /tmp/libreoffice && \ tar -xzf /tmp/lo.tar.gz -C /tmp/libreoffice --strip-components=1 && \