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
18 changes: 16 additions & 2 deletions .github/workflows/validate.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,24 @@ on:
push:
branches: [main]

permissions:
contents: read

jobs:
validate:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
# actions/checkout v4
- uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5

- name: Ensure workflow actions are pinned
run: |
refs="$(grep -RhoE 'uses:[[:space:]]+[^[:space:]]+@[^[:space:]]+' .github/workflows || true)"
bad_refs="$(printf '%s\n' "$refs" | awk -F@ 'NF > 1 && $2 !~ /^[0-9a-f]{40}$/ {print}')"
if [ -n "$bad_refs" ]; then
printf 'Mutable GitHub Actions refs are forbidden:\n%s\n' "$bad_refs"
exit 1
fi

- name: Check required files exist
run: |
Expand All @@ -30,7 +43,8 @@ jobs:
fi

- name: Validate markdown links
uses: gaurav-nelson/github-action-markdown-link-check@v1
# gaurav-nelson/github-action-markdown-link-check v1
uses: gaurav-nelson/github-action-markdown-link-check@5c5dfc0ac2e225883c0e5f03a85311ec2830d368
with:
use-quiet-mode: yes
check-modified-files-only: no
Loading