fix hashFile

This commit is contained in:
Sergey Dolin 2023-11-04 09:10:07 +01:00 committed by GitHub
parent d8ddd101cc
commit b91a04b1a7
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -209,14 +209,14 @@ env:
GOARCH: ... GOARCH: ...
steps: steps:
- run: echo "$GOOS $GOARCH" > /tmp/env - run: echo "$GOOS $GOARCH" > env.txt
- uses: actions/setup-go@v4 - uses: actions/setup-go@v4
with: with:
go-version: '1.17' go-version: '1.17'
cache-dependency-path: | cache-dependency-path: |
go.sum go.sum
/tmp/env env.txt
- run: go run hello.go - run: go run hello.go
``` ```
@ -269,14 +269,14 @@ build:
key: setup-go-deps-${{ runner.os }}-go-${{ hashFiles('go.sum go.mod') }} key: setup-go-deps-${{ runner.os }}-go-${{ hashFiles('go.sum go.mod') }}
- name: - name:
run: echo "$GOOS $GOARCH"> /tmp/env run: echo "$GOOS $GOARCH"> env.txt
- name: Set up intermediate built files cache - name: Set up intermediate built files cache
uses: actions/cache@v3 uses: actions/cache@v3
with: with:
path: | path: |
${{ env.modcache }} ${{ env.modcache }}
key: setup-go-build-${{ env.GOOS }}-${{ env.GOARCH }}-${{ runner.os }}-go-${{ hashFiles('**/*.go /tmp/env') }} key: setup-go-build-${{ env.GOOS }}-${{ env.GOARCH }}-${{ runner.os }}-go-${{ hashFiles('**/*.go', 'env.txt') }}
restore-keys: | restore-keys: |
setup-go-build-${{ env.GOOS }}-${{ env.GOARCH }} setup-go-build-${{ env.GOOS }}-${{ env.GOARCH }}