diff --git a/.github/workflows/docker.yaml b/.github/workflows/docker.yaml index f85c2c0e..dc59ed49 100644 --- a/.github/workflows/docker.yaml +++ b/.github/workflows/docker.yaml @@ -181,7 +181,7 @@ jobs: run: | docker run --platform=${{ matrix.platform }} --rm \ "$(jq -r '."builder-${{ matrix.variant }}"."containerimage.config.digest"' <<< "${METADATA}")" \ - sh -c ' go test -buildmode=pie -v ./... && cd caddy && go test -buildmode=pie -v ./...' + sh -c 'CGO_CXXFLAGS=-fPIE CGO_CFLAGS=-fPIE CGO_LDFLAGS=-pie go test -buildmode=pie -v ./... && cd caddy && go test -buildmode=pie -v ./...' env: METADATA: ${{ steps.build.outputs.metadata }} # Adapted from https://docs.docker.com/build/ci/github-actions/multi-platform/