Skip to content

Commit ab50866

Browse files
committed
Chore: Remove GOPATH from GitHub Actions
Signed-off-by: Brandon Mitchell <[email protected]>
1 parent 64294bd commit ab50866

File tree

1 file changed

+5
-12
lines changed

1 file changed

+5
-12
lines changed

.github/workflows/docs-and-linting.yml

Lines changed: 5 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -14,30 +14,23 @@ jobs:
1414
# https://github.com/actions/setup-go/tree/v5#getting-go-version-from-the-gomod-file
1515
# https://github.com/actions/setup-go/tree/v5#using-stableoldstable-aliases
1616

17-
env:
18-
RELEASE_GO_VER: "1.23"
19-
2017
name: Documentation and Linting
2118
steps:
2219

2320
- uses: actions/checkout@v4
24-
with:
25-
path: go/src/github.com/opencontainers/image-spec
2621

2722
- uses: actions/setup-go@v5
2823
with:
2924
go-version: ${{ matrix.go != 'go.mod' && matrix.go || null }}
30-
go-version-file: ${{ matrix.go == 'go.mod' && 'go/src/github.com/opencontainers/image-spec/go.mod' || null }}
31-
cache-dependency-path: go/src/github.com/opencontainers/image-spec/go.sum
25+
go-version-file: ${{ matrix.go == 'go.mod' && 'go.mod' || null }}
26+
# cache-dependency-path: go.sum
3227

3328
- name: Render and Lint
3429
env:
35-
GOPATH: /home/runner/work/image-spec/image-spec/go
3630
# do not automatically upgrade go to a different version: https://go.dev/doc/toolchain
3731
GOTOOLCHAIN: local
3832
run: |
39-
export PATH=$GOPATH/bin:$PATH
40-
cd go/src/github.com/opencontainers/image-spec
33+
export PATH="$(go env GOPATH)/bin:$PATH"
4134
make install.tools
4235
go get -t -d ./...
4336
ls ../
@@ -50,7 +43,7 @@ jobs:
5043
5144
- name: documentation artifacts
5245
uses: actions/upload-artifact@v4
53-
if: matrix.go == env.RELEASE_GO_VER
46+
if: matrix.go == 'stable'
5447
with:
5548
name: oci-docs
56-
path: go/src/github.com/opencontainers/image-spec/output
49+
path: output

0 commit comments

Comments
 (0)