File tree 1 file changed +11
-0
lines changed
1 file changed +11
-0
lines changed Original file line number Diff line number Diff line change 81
81
echo "" >> $GITHUB_ENV
82
82
echo 'type=raw,value=${{ steps.semver_parser.outputs.major }}.${{ steps.semver_parser.outputs.minor }}' >> $GITHUB_ENV
83
83
echo 'EOF' >> $GITHUB_ENV
84
+ # Setup Golang to use go pkg cache which is utilized in Dockerfile's cache mount.
85
+ - name : Setup golang
86
+ uses : actions/setup-go@v5
87
+ with :
88
+ go-version-file : go.mod
89
+ - run : echo "GOPATH=$(go env GOPATH)" >> $GITHUB_ENV
90
+ - run : echo "GOCACHE=$(go env GOCACHE)" >> $GITHUB_ENV
84
91
- name : Set up Docker Buildx
85
92
uses : docker/setup-buildx-action@v3
86
93
- name : Cache Docker layers
@@ -117,6 +124,8 @@ jobs:
117
124
TAG=${{ steps.meta.outputs.version }}
118
125
COMMIT=${{ github.sha }}
119
126
REPO_INFO=https://github.com/${{ github.repository }}.git
127
+ GOPATH=${{ env.GOPATH}}
128
+ GOCACHE=${{ env.GOCACHE}}
120
129
- name : Build and push distroless image to DockerHub
121
130
id : docker_build
122
131
uses : docker/build-push-action@v5
@@ -131,6 +140,8 @@ jobs:
131
140
TAG=${{ steps.meta.outputs.version }}
132
141
COMMIT=${{ github.sha }}
133
142
REPO_INFO=https://github.com/${{ github.repository }}.git
143
+ GOPATH=${{ env.GOPATH}}
144
+ GOCACHE=${{ env.GOCACHE}}
134
145
135
146
test-e2e :
136
147
needs : [verify-manifest-tag, build-push-images]
You can’t perform that action at this time.
0 commit comments