Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 5 additions & 12 deletions .github/workflows/docs-and-linting.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,30 +14,23 @@ jobs:
# https://github.com/actions/setup-go/tree/v5#getting-go-version-from-the-gomod-file
# https://github.com/actions/setup-go/tree/v5#using-stableoldstable-aliases

env:
RELEASE_GO_VER: "1.23"

name: Documentation and Linting
steps:

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

- uses: actions/setup-go@v5
with:
go-version: ${{ matrix.go != 'go.mod' && matrix.go || null }}
go-version-file: ${{ matrix.go == 'go.mod' && 'go/src/github.com/opencontainers/image-spec/go.mod' || null }}
cache-dependency-path: go/src/github.com/opencontainers/image-spec/go.sum
go-version-file: ${{ matrix.go == 'go.mod' && 'go.mod' || null }}
# cache-dependency-path: go.sum

- name: Render and Lint
env:
GOPATH: /home/runner/work/image-spec/image-spec/go
# do not automatically upgrade go to a different version: https://go.dev/doc/toolchain
GOTOOLCHAIN: local
run: |
export PATH=$GOPATH/bin:$PATH
cd go/src/github.com/opencontainers/image-spec
export PATH="$(go env GOPATH)/bin:$PATH"
make install.tools
go get -t -d ./...
ls ../
Expand All @@ -50,7 +43,7 @@ jobs:

- name: documentation artifacts
uses: actions/upload-artifact@v4
if: matrix.go == env.RELEASE_GO_VER
if: matrix.go == 'stable'
with:
name: oci-docs
path: go/src/github.com/opencontainers/image-spec/output
path: output