diff --git a/.forgejo/workflows/build.yaml b/.forgejo/workflows/build.yaml index 09c85e75..0a61f1fc 100644 --- a/.forgejo/workflows/build.yaml +++ b/.forgejo/workflows/build.yaml @@ -46,12 +46,20 @@ jobs: - name: Verify compilation run: | - docker run --rm \ - -v "${{ github.workspace }}:/app" \ - -w /app \ + set -euo pipefail + # Pipe the workspace into the container via stdin instead of a volume + # mount, because the runner is itself a container whose filesystem the + # host Docker daemon cannot see. + tar --exclude='_build' --exclude='deps' --exclude='.git' \ + --exclude='priv/static/assets' --exclude='assets/node_modules' \ + --exclude='rust' --exclude='target' \ + -cf - . | \ + docker run --rm -i \ -e MIX_ENV=prod \ + -w /app \ docker.io/hexpm/elixir:1.20.1-erlang-29.0.2-debian-trixie-20260518-slim \ - sh -c '\ + sh -euc '\ + mkdir -p /app && cd /app && tar xf - && \ mix local.hex --force && \ mix local.rebar --force && \ mix deps.get --only prod && \