Skip to content

Commit

Permalink
fix(ci): fix nightly build by adding missing GOCACHE and GOPATH build…
Browse files Browse the repository at this point in the history
… params (#5779)
  • Loading branch information
pmalek committed Mar 29, 2024
1 parent e237ebc commit eee3ed3
Showing 1 changed file with 12 additions and 1 deletion.
13 changes: 12 additions & 1 deletion .github/workflows/nightly.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,15 @@ jobs:
steps:
- name: checkout repository
uses: actions/checkout@v4

# Setup Golang to use go pkg cache which is utilized in Dockerfile's cache mount.
- name: Setup golang
uses: actions/setup-go@v5
with:
fetch-depth: 0
go-version-file: go.mod
- run: echo "GOPATH=$(go env GOPATH)" >> $GITHUB_ENV
- run: echo "GOCACHE=$(go env GOCACHE)" >> $GITHUB_ENV

- name: Add standard tags
id: tags-standard
run: |
Expand Down Expand Up @@ -59,6 +66,8 @@ jobs:
TAG=${{ steps.meta.outputs.version }}
COMMIT=${{ github.sha }}
REPO_INFO=https://github.com/${{ github.repository }}.git
GOPATH=${{ env.GOPATH}}
GOCACHE=${{ env.GOCACHE}}
- name: Build and push distroless image to DockerHub
id: docker_build
uses: docker/build-push-action@v5
Expand All @@ -73,3 +82,5 @@ jobs:
TAG=${{ steps.meta.outputs.version }}
COMMIT=${{ github.sha }}
REPO_INFO=https://github.com/${{ github.repository }}.git
GOPATH=${{ env.GOPATH}}
GOCACHE=${{ env.GOCACHE}}

0 comments on commit eee3ed3

Please sign in to comment.