[Snyk] Security upgrade mermaid from 9.1.7 to 11.4.1 #125
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Spell check | |
on: | |
pull_request: | |
types: | |
- opened | |
- synchronize | |
jobs: | |
spell-check: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout Repository | |
uses: actions/checkout@v3 | |
- name: Get Changed Files from Pull Request | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
run: | | |
# get file names and separate them with space ' ' | |
files=$(gh pr diff ${{ github.event.pull_request.number }} --name-only | grep -E "\.md$" | xargs -I {} sh -c 'echo "\"./{}\""' | tr '\n' ' ') | |
echo "CHANGED_FILES=$files" >> "$GITHUB_ENV" | |
- name: Output Changed Files | |
run: echo ${{ env.CHANGED_FILES }} | |
- name: Set up Python environment | |
uses: actions/setup-python@v3 | |
with: | |
python-version: 3.x | |
if: ${{ !cancelled() && env.CHANGED_FILES != '' }} | |
- name: Create virtual environment | |
run: python -m venv venv | |
if: ${{ !cancelled() && env.CHANGED_FILES != '' }} | |
- name: Activate virtual environment | |
run: source venv/bin/activate | |
if: ${{ !cancelled() && env.CHANGED_FILES != '' }} | |
- name: Install codespell | |
run: pip install codespell | |
if: ${{ !cancelled() && env.CHANGED_FILES != '' }} | |
- name: Install case-police | |
run: npm install -g case-police | |
if: ${{ !cancelled() && env.CHANGED_FILES != '' }} | |
- name: Install alex | |
run: npm install -g alex | |
if: ${{ !cancelled() && env.CHANGED_FILES != '' }} | |
- name: Spelling Errors | |
run: codespell --count --skip="*.js,./.git,./content/support/Other Languages/*" ${{ env.CHANGED_FILES }} | |
if: ${{ !cancelled() && env.CHANGED_FILES != '' }} | |
- name: Case Police | |
run: case-police ${{ env.CHANGED_FILES }} --disable DoS | |
if: ${{ !cancelled() && env.CHANGED_FILES != '' }} | |
- name: Create .alexrc file | |
run: | | |
echo '{ "allow": ["actors-actresses", "attacks", "attack", "hooks", "host-hostess", "hostesses-hosts", "invalid", "just", "period", "remains"], "profanitySureness": 2 }' > .alexrc | |
if: ${{ !cancelled() && env.CHANGED_FILES != '' }} | |
- name: Alex (inclusive language) | |
run: alex ${{ env.CHANGED_FILES }} | |
if: ${{ !cancelled() && env.CHANGED_FILES != '' }} |