chore(deps): add dependabot and SHA-pin workflow deps (#456)

Introduces Dependabot & SHA-pins workflow deps, as per the [Discord
thread](https://discord.com/channels/1358869848138059966/1399986970851282954/1415896798144368762).

A note on the commit message: I used convention commit format out of
habit, but can rewrite the it to adhere to the
[styleguide](https://go.dev/wiki/CommitMessage) if critical.
This commit is contained in:
Frenchie 2025-09-19 01:25:19 +10:00 • committed by GitHub
commit 1cfd489d72
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
3 changed files with 46 additions and 46 deletions

39
.github/workflows/docs-check.yml vendored Normal file
View file

@ -0,0 +1,39 @@
name: Docs Check
on:
workflow_dispatch:
pull_request:
paths:
- 'internal/readme/**'
- 'README.md'
- 'internal/docs/**'
- 'docs/**'
permissions:
contents: read
jobs:
docs-check:
runs-on: ubuntu-latest
steps:
- name: Set up Go
uses: actions/setup-go@d35c59abb061a4a6fb18e82ac0862c26744d6ab5 # v5
- name: Check out code
uses: actions/checkout@08eba0b27e820071cde6df949e0beb9ba4906955 # v4
- name: Check docs are up-to-date
run: |
go generate ./...
if [ -n "$(git status --porcelain)" ]; then
echo "ERROR: docs are not up-to-date!"
echo ""
echo "The docs differ from what would be generated by `go generate ./...`."
echo "Please update internal/**/*.src.md instead of directly editing README.md or docs/ files,"
echo "then run `go generate ./...` to regenerate docs."
echo ""
echo "Changes:"
git status --porcelain
echo ""
echo "Diff:"
git diff
exit 1
fi
echo "Docs are up-to-date."

View file

@ -1,39 +0,0 @@
name: README Check
on:
workflow_dispatch:
pull_request:
paths:
- 'internal/readme/**'
- 'README.md'
- 'internal/docs/**'
- 'docs/**'
permissions:
contents: read
jobs:
readme-check:
runs-on: ubuntu-latest
steps:
- name: Set up Go
uses: actions/setup-go@v5
- name: Check out code
uses: actions/checkout@v4
- name: Check docs is up-to-date
run: |
go generate ./...
if [ -n "$(git status --porcelain)" ]; then
echo "ERROR: docs are not up-to-date!"
echo ""
echo "The docs differ from what would be generated by `go generate ./...`."
echo "Please update internal/**/*.src.md instead of directly editing README.md or docs/ files,"
echo "then run `go generate ./...` to regenerate docs."
echo ""
echo "Changes:"
git status --porcelain
echo ""
echo "Diff:"
git diff
exit 1
fi
echo "Docs are up-to-date."

View file

@ -14,9 +14,9 @@ jobs:
runs-on: ubuntu-latest runs-on: ubuntu-latest
steps: steps:
- name: Check out code - name: Check out code
uses: actions/checkout@v4 uses: actions/checkout@08eba0b27e820071cde6df949e0beb9ba4906955 # v4
- name: Set up Go - name: Set up Go
uses: actions/setup-go@v5 uses: actions/setup-go@d35c59abb061a4a6fb18e82ac0862c26744d6ab5 # v5
with: with:
go-version: "^1.23" go-version: "^1.23"
- name: Check formatting - name: Check formatting
@ -31,7 +31,7 @@ jobs:
- name: Run Go vet - name: Run Go vet
run: go vet ./... run: go vet ./...
- name: Run staticcheck - name: Run staticcheck
uses: dominikh/staticcheck-action@v1 uses: dominikh/staticcheck-action@024238d2898c874f26d723e7d0ff4308c35589a2 # v1
with: with:
version: "latest" version: "latest"
@ -42,9 +42,9 @@ jobs:
go: ["1.23", "1.24", "1.25"] go: ["1.23", "1.24", "1.25"]
steps: steps:
- name: Check out code - name: Check out code
uses: actions/checkout@v4 uses: actions/checkout@08eba0b27e820071cde6df949e0beb9ba4906955 # v4
- name: Set up Go - name: Set up Go
uses: actions/setup-go@v5 uses: actions/setup-go@d35c59abb061a4a6fb18e82ac0862c26744d6ab5 # v5
with: with:
go-version: ${{ matrix.go }} go-version: ${{ matrix.go }}
- name: Test - name: Test
@ -54,9 +54,9 @@ jobs:
runs-on: ubuntu-latest runs-on: ubuntu-latest
steps: steps:
- name: Check out code - name: Check out code
uses: actions/checkout@v4 uses: actions/checkout@08eba0b27e820071cde6df949e0beb9ba4906955 # v4
- name: Set up Go - name: Set up Go
uses: actions/setup-go@v5 uses: actions/setup-go@d35c59abb061a4a6fb18e82ac0862c26744d6ab5 # v5
with: with:
go-version: "1.24" go-version: "1.24"
- name: Test with -race - name: Test with -race