From a0378daa0c24b8ac1c5d50c6b86b39e275255821 Mon Sep 17 00:00:00 2001 From: Jakub Warczarek Date: Mon, 24 Jun 2024 18:58:15 +0200 Subject: [PATCH] chore: perform go mod download in shared build-workflow (#374) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: Patryk Małek --- .github/workflows/__build-workflow.yaml | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/.github/workflows/__build-workflow.yaml b/.github/workflows/__build-workflow.yaml index 40ddea4e5..199013e6e 100644 --- a/.github/workflows/__build-workflow.yaml +++ b/.github/workflows/__build-workflow.yaml @@ -195,6 +195,12 @@ jobs: uses: actions/setup-go@v5 with: go-version-file: go.mod + + # Path for additional-build-contexts may point to dependencies that are pulled by Go toolchain, + # so we need to download them before building the image. + - name: Set up Go dependencies for additional build contexts + if: ${{ inputs.additional-build-contexts != ''}} + run: go mod download - run: echo "GOPATH=$(go env GOPATH)" >> $GITHUB_ENV - run: echo "GOCACHE=$(go env GOCACHE)" >> $GITHUB_ENV