Use local check-spelling repository
If you're running a Debian derivative (or have git
, curl
, and jq
installed) and can run sudo
, then the following script should be sufficient to run check-spelling locally:
export spellchecker=$HOME/check-spelling
if [ ! -d $spellchecker ]; then
if ! command -v git > /dev/null ; then
apt-get update
apt-get install -y git
fi
git clone https://github.com/check-spelling/check-spelling.git $spellchecker
(cd $spellchecker && git checkout prerelease)
fi
export INPUT_CONFIG=.github/actions/spelling
export INPUT_DICTIONARY_URL=https://raw.githubusercontent.com/check-spelling/check-spelling/dictionary-20200211/dict.txt
export GITHUB_EVENT_NAME=push
$spellchecker/fast-install.pl && $spellchecker/unknown-words.sh
Notes
spellchecker
points to the directory where you want your local check-spelling to live.INPUT_CONFIG
is the equivalent of thewith: / config:
field from your workflow.- The repository to be checked is the current working directory.
Disclaimers
- Both this script and check-spelling itself will try to install software globally (curl, git, jq, and CheckSpelling's Perl modules)
- Check Spelling creates lots of temporary directories in your temp directory. It expects your system to clean them up (or not care that they're created). If this is a problem, run this in a docker or similar disposable world.
Alternatives
For most people, using nektos/act should work well enough that one shouldn't need to use this script.
FAQ | Showcase | Event descriptions | Configuration information | Known Issues | Possible features | Deprecations | Release notes | Helpful scripts