|
@@ -80,6 +80,31 @@ jobs:
|
|
|
with:
|
|
with:
|
|
|
fetch-depth: 0
|
|
fetch-depth: 0
|
|
|
|
|
|
|
|
|
|
+ - name: Setup Go
|
|
|
|
|
+ uses: actions/setup-go@v2
|
|
|
|
|
+ with:
|
|
|
|
|
+ go-version: ${{ env.GO_VERSION }}
|
|
|
|
|
+
|
|
|
|
|
+ - name: Find the Go Cache
|
|
|
|
|
+ id: go
|
|
|
|
|
+ run: |
|
|
|
|
|
+ echo "::set-output name=build-cache::$(go env GOCACHE)"
|
|
|
|
|
+ echo "::set-output name=mod-cache::$(go env GOMODCACHE)"
|
|
|
|
|
+
|
|
|
|
|
+ - name: Cache the Go Build Cache
|
|
|
|
|
+ uses: actions/cache@v3
|
|
|
|
|
+ with:
|
|
|
|
|
+ path: ${{ steps.go.outputs.build-cache }}
|
|
|
|
|
+ key: ${{ runner.os }}-build-publish-artifacts-${{ hashFiles('**/go.sum') }}
|
|
|
|
|
+ restore-keys: ${{ runner.os }}-build-publish-artifacts-
|
|
|
|
|
+
|
|
|
|
|
+ - name: Cache Go Dependencies
|
|
|
|
|
+ uses: actions/cache@v3
|
|
|
|
|
+ with:
|
|
|
|
|
+ path: ${{ steps.go.outputs.mod-cache }}
|
|
|
|
|
+ key: ${{ runner.os }}-pkg-${{ hashFiles('**/go.sum') }}
|
|
|
|
|
+ restore-keys: ${{ runner.os }}-pkg-
|
|
|
|
|
+
|
|
|
- name: Login to Docker
|
|
- name: Login to Docker
|
|
|
uses: docker/login-action@v1
|
|
uses: docker/login-action@v1
|
|
|
if: env.GHCR_USERNAME != ''
|
|
if: env.GHCR_USERNAME != ''
|