Skip to content

ci: Replace woke with codespell #7

ci: Replace woke with codespell

ci: Replace woke with codespell #7

Workflow file for this run

# Codespell configuration is within .codespellrc
---
name: Codespell
on: # yamllint disable-line rule:truthy
- pull_request
permissions:
contents: read
jobs:
codespell:
name: Check for spelling errors
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Checkout tools repo
uses: actions/checkout@v4
with:
repository: spetrosi/actions-codespell
ref: add-regex-input
path: /tmp/add-regex-input
- name: Get variable with regex values
id: regexvar
run: |
curl -L -s -o dictionary_usage.txt https://raw.githubusercontent.com/codespell-project/codespell/refs/heads/main/codespell_lib/data/dictionary_usage.txt
regexvar=$(sed 's/->.*//g' dictionary_usage.txt | sed 's/$/|/' | tr -d '\n' | sed 's/.$//')
rm dictionary_usage.txt
echo "$regexvar"
echo "regexvar=$regexvar" >> "$GITHUB_OUTPUT"
# - name: Install codespell
# run: pip install codespell
# - name: Get all changed files
# id: files
# uses: jitterbit/get-changed-files@v1
# with:
# format: 'space-delimited'
- name: Show errors from codespell as annotation in GitHub Actions
uses: codespell-project/codespell-problem-matcher@v1
# - name: Run codespell
# run: codespell --regex "${{ steps.regexvar.outputs.regexvar }}" -C0
- name: Codespell
uses: /tmp/add-regex-input
with:
regex: ${{ steps.regexvar.outputs.regexvar }}