Skip to content

Merge pull request #1271 from sudo-bmitch/pr-applying-broken-link #496

Merge pull request #1271 from sudo-bmitch/pr-applying-broken-link

Merge pull request #1271 from sudo-bmitch/pr-applying-broken-link #496

name: Render and Lint Documentation
on:
push:
branches:
- main
pull_request:
workflow_dispatch:
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
permissions:
contents: read
jobs:
build:
runs-on: ubuntu-latest
strategy:
matrix:
# current Go releases plus the version in the go.mod are tested
go: ['go.mod', 'oldstable', 'stable']
# 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
name: Documentation and Linting
steps:
- uses: actions/checkout@v4
- uses: actions/setup-go@v5
with:
go-version: ${{ matrix.go != 'go.mod' && matrix.go || null }}
go-version-file: ${{ matrix.go == 'go.mod' && 'go.mod' || null }}
# cache-dependency-path: go.sum
- name: Render and Lint
env:
# do not automatically upgrade go to a different version: https://go.dev/doc/toolchain
GOTOOLCHAIN: local
run: |
export PATH="$(go env GOPATH)/bin:$PATH"
make install.tools
go get -t -d ./...
ls ../
make
make .gitvalidation
make lint
make check-license
make test
make docs
- name: documentation artifacts
uses: actions/upload-artifact@v4
if: matrix.go == 'stable'
with:
name: oci-docs
path: output