From 5d491982c399723c1b19ec6bdc3530cd9c970484 Mon Sep 17 00:00:00 2001 From: Wantong Jiang Date: Mon, 21 Oct 2024 20:46:33 +0000 Subject: [PATCH] add codespell check upon PR creation --- .codespellignore | 0 .github/workflows/codespell.yml | 24 ++++++++++++++++++++++++ 2 files changed, 24 insertions(+) create mode 100644 .codespellignore create mode 100644 .github/workflows/codespell.yml diff --git a/.codespellignore b/.codespellignore new file mode 100644 index 000000000..e69de29bb diff --git a/.github/workflows/codespell.yml b/.github/workflows/codespell.yml new file mode 100644 index 000000000..083f4c4f7 --- /dev/null +++ b/.github/workflows/codespell.yml @@ -0,0 +1,24 @@ +# GitHub Action to automate the identification of common misspellings in text files. +# https://github.com/codespell-project/actions-codespell +# https://github.com/codespell-project/codespell +name: codespell +on: [pull_request] +permissions: + contents: read + +jobs: + codespell: + name: Check for spelling errors + runs-on: ubuntu-latest + steps: + - name: Harden Runner + uses: step-security/harden-runner@91182cccc01eb5e619899d80e4e971d6181294a7 # v2.10.1 + with: + egress-policy: audit + + - uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7 + - uses: codespell-project/actions-codespell@406322ec52dd7b488e48c1c4b82e2a8b3a1bf630 # master + with: + check_filenames: true + skip: ./.git,./.github/workflows/codespell.yml,.git,*.png,*.jpg,*.svg,*.sum,./vendor,go.sum,testdata + ignore_words_file: .codespellignore