From 748fe0dce851e6e3587417755ca657349040a227 Mon Sep 17 00:00:00 2001 From: tannevaled Date: Mon, 30 Nov 2026 20:58:37 +0100 Subject: [PATCH] ci: read pinned tools from a tools/ side module, not go run/install pkg@version `go run`/`go install pkg@version` also looks up the deprecation of the module's NEWEST release against sum.golang.org, so a fresh tag turns CI red for ~30 minutes. Written by wfaudit --fix (go-fleettools/fleettools). --- .github/workflows/docs.yml | 4 ++-- tools/linkcheck/go.mod | 13 +++++++++++++ tools/linkcheck/go.sum | 15 +++++++++++++++ tools/pagehistory/go.mod | 12 ++++++++++++ tools/pagehistory/go.sum | 12 ++++++++++++ 5 files changed, 54 insertions(+), 2 deletions(-) create mode 100644 tools/linkcheck/go.mod create mode 100644 tools/linkcheck/go.sum create mode 100644 tools/pagehistory/go.mod create mode 100644 tools/pagehistory/go.sum diff --git a/.github/workflows/docs.yml b/.github/workflows/docs.yml index 5c36dad..2067b96 100644 --- a/.github/workflows/docs.yml +++ b/.github/workflows/docs.yml @@ -78,7 +78,7 @@ jobs: - name: Page history run: | mkdir -p data - go run github.com/tannevaled/hextra/cmd/pagehistory@v0.21.0 > data/pagehistory.json + "$(go -C "${{ github.workspace }}/tools/pagehistory" tool -n github.com/tannevaled/hextra/cmd/pagehistory)" > data/pagehistory.json # --panicOnWarning: a deprecated setting or a template warning fails the # build rather than scrolling by. A broken {{< relref >}} is an error. @@ -146,7 +146,7 @@ jobs: token="${RUNNER_TEMP}/linkcheck-token" trap 'rm -f "${token}"' EXIT printf '%s' '${{ github.token }}' > "${token}" - go run github.com/go-fleettools/fleettools/cmd/linkcheck@v0.88.0 \ + "$(go -C "${{ github.workspace }}/tools/linkcheck" tool -n github.com/go-fleettools/fleettools/cmd/linkcheck)" \ --token-file "${token}" \ --skip go-scikit.github.io/docs \ --skip github.com/go-scikit/docs/ \ diff --git a/tools/linkcheck/go.mod b/tools/linkcheck/go.mod new file mode 100644 index 0000000..d8ed20d --- /dev/null +++ b/tools/linkcheck/go.mod @@ -0,0 +1,13 @@ +module github.com/go-scikit/docs/tools/linkcheck + +go 1.27.3 + +tool github.com/go-fleettools/fleettools/cmd/linkcheck + +require ( + github.com/go-fleettools/fleettools v0.88.0 // indirect + github.com/inconshreveable/mousetrap v1.1.0 // indirect + github.com/spf13/cobra v1.10.2 // indirect + github.com/spf13/pflag v1.0.10 // indirect + golang.org/x/mod v0.42.0 // indirect +) diff --git a/tools/linkcheck/go.sum b/tools/linkcheck/go.sum new file mode 100644 index 0000000..5ac7320 --- /dev/null +++ b/tools/linkcheck/go.sum @@ -0,0 +1,15 @@ +github.com/cpuguy83/go-md2man/v2 v2.0.6/go.mod h1:oOW0eioCTA6cOiMLiUPZOpcVxMig6NIQQ7OS05n1F4g= +github.com/go-fleettools/fleettools v0.88.0 h1:BF5MadVW35myf3wFn1S3APAJ2ZE3eFfthprdLbPuBQM= +github.com/go-fleettools/fleettools v0.88.0/go.mod h1:F3fqyWaeWyH9ZoHxLZZgWMLWsZfVdWRgzOUL0H/K+Z4= +github.com/inconshreveable/mousetrap v1.1.0 h1:wN+x4NVGpMsO7ErUn/mUI3vEoE6Jt13X2s0bqwp9tc8= +github.com/inconshreveable/mousetrap v1.1.0/go.mod h1:vpF70FUmC8bwa3OWnCshd2FqLfsEA9PFc4w1p2J65bw= +github.com/russross/blackfriday/v2 v2.1.0/go.mod h1:+Rmxgy9KzJVeS9/2gXHxylqXiyQDYRxCVz55jmeOWTM= +github.com/spf13/cobra v1.10.2 h1:DMTTonx5m65Ic0GOoRY2c16WCbHxOOw6xxezuLaBpcU= +github.com/spf13/cobra v1.10.2/go.mod h1:7C1pvHqHw5A4vrJfjNwvOdzYu0Gml16OCs2GRiTUUS4= +github.com/spf13/pflag v1.0.9/go.mod h1:McXfInJRrz4CZXVZOBLb0bTZqETkiAhM9Iw0y3An2Bg= +github.com/spf13/pflag v1.0.10 h1:4EBh2KAYBwaONj6b2Ye1GiHfwjqyROoF4RwYO+vPwFk= +github.com/spf13/pflag v1.0.10/go.mod h1:McXfInJRrz4CZXVZOBLb0bTZqETkiAhM9Iw0y3An2Bg= +go.yaml.in/yaml/v3 v3.0.4/go.mod h1:DhzuOOF2ATzADvBadXxruRBLzYTpT36CKvDb3+aBEFg= +golang.org/x/mod v0.42.0 h1:ICeL3t2L30ljSPHHxDnR4fqVcBt/zR2zJAb9juavmQg= +golang.org/x/mod v0.42.0/go.mod h1:u5fzIrRInkL8MaO1cbRkUHT64v303YIT5KEqpNr7jRs= +gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= diff --git a/tools/pagehistory/go.mod b/tools/pagehistory/go.mod new file mode 100644 index 0000000..2386aba --- /dev/null +++ b/tools/pagehistory/go.mod @@ -0,0 +1,12 @@ +module github.com/go-scikit/docs/tools/pagehistory + +go 1.24 + +tool github.com/tannevaled/hextra/cmd/pagehistory + +require ( + github.com/inconshreveable/mousetrap v1.1.0 // indirect + github.com/spf13/cobra v1.10.2 // indirect + github.com/spf13/pflag v1.0.9 // indirect + github.com/tannevaled/hextra/cmd/pagehistory v0.21.0 // indirect +) diff --git a/tools/pagehistory/go.sum b/tools/pagehistory/go.sum new file mode 100644 index 0000000..ab615dd --- /dev/null +++ b/tools/pagehistory/go.sum @@ -0,0 +1,12 @@ +github.com/cpuguy83/go-md2man/v2 v2.0.6/go.mod h1:oOW0eioCTA6cOiMLiUPZOpcVxMig6NIQQ7OS05n1F4g= +github.com/inconshreveable/mousetrap v1.1.0 h1:wN+x4NVGpMsO7ErUn/mUI3vEoE6Jt13X2s0bqwp9tc8= +github.com/inconshreveable/mousetrap v1.1.0/go.mod h1:vpF70FUmC8bwa3OWnCshd2FqLfsEA9PFc4w1p2J65bw= +github.com/russross/blackfriday/v2 v2.1.0/go.mod h1:+Rmxgy9KzJVeS9/2gXHxylqXiyQDYRxCVz55jmeOWTM= +github.com/spf13/cobra v1.10.2 h1:DMTTonx5m65Ic0GOoRY2c16WCbHxOOw6xxezuLaBpcU= +github.com/spf13/cobra v1.10.2/go.mod h1:7C1pvHqHw5A4vrJfjNwvOdzYu0Gml16OCs2GRiTUUS4= +github.com/spf13/pflag v1.0.9 h1:9exaQaMOCwffKiiiYk6/BndUBv+iRViNW+4lEMi0PvY= +github.com/spf13/pflag v1.0.9/go.mod h1:McXfInJRrz4CZXVZOBLb0bTZqETkiAhM9Iw0y3An2Bg= +github.com/tannevaled/hextra/cmd/pagehistory v0.21.0 h1:4qmh7m9Yjx5IPGwD5My74kI/D6t4V7rjYbBc+BknImM= +github.com/tannevaled/hextra/cmd/pagehistory v0.21.0/go.mod h1:HW3YqsI2qdXHFsZfapDMmyN+Ko7h7O1TKnUa1ZYCzgU= +go.yaml.in/yaml/v3 v3.0.4/go.mod h1:DhzuOOF2ATzADvBadXxruRBLzYTpT36CKvDb3+aBEFg= +gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=