Skip to content

Commit

Permalink
ci: add missing GOCACHE and GOPATH in release worflow (#6192)
Browse files Browse the repository at this point in the history
  • Loading branch information
pmalek committed Jun 12, 2024
1 parent c4eb934 commit b3affa1
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions .github/workflows/release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,13 @@ jobs:
echo "" >> $GITHUB_ENV
echo 'type=raw,value=${{ steps.semver_parser.outputs.major }}.${{ steps.semver_parser.outputs.minor }}' >> $GITHUB_ENV
echo 'EOF' >> $GITHUB_ENV
# Setup Golang to use go pkg cache which is utilized in Dockerfile's cache mount.
- name: Setup golang
uses: actions/setup-go@v5
with:
go-version-file: go.mod
- run: echo "GOPATH=$(go env GOPATH)" >> $GITHUB_ENV
- run: echo "GOCACHE=$(go env GOCACHE)" >> $GITHUB_ENV
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Cache Docker layers
Expand Down Expand Up @@ -117,6 +124,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 @@ -131,6 +140,8 @@ jobs:
TAG=${{ steps.meta.outputs.version }}
COMMIT=${{ github.sha }}
REPO_INFO=https://github.com/${{ github.repository }}.git
GOPATH=${{ env.GOPATH}}
GOCACHE=${{ env.GOCACHE}}
test-e2e:
needs: [verify-manifest-tag, build-push-images]
Expand Down

0 comments on commit b3affa1

Please sign in to comment.