Add reproducibility index file #1004
Workflow file for this run
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: Check Spelling | |
on: | |
pull_request: | |
branches: | |
- main | |
- reproducibility-docs | |
- feature/* | |
paths: | |
- docs/** | |
workflow_dispatch: | |
schedule: | |
- cron: "0 0 15 * *" # 15th of every month at midnight | |
concurrency: | |
# only one run per branch at a time | |
group: ${{ github.workflow }}-${{ github.ref }} | |
cancel-in-progress: true | |
jobs: | |
spellcheck: | |
runs-on: ubuntu-latest | |
name: Spell check files | |
permissions: | |
contents: read | |
issues: write | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: Spell check action | |
uses: alexslemonade/spellcheck@v0 | |
id: spell | |
with: | |
dictionary: .github/components/dictionary.txt | |
files: ${{ github.event_name == 'pull_request' && 'docs/* docs/*/* docs/*/*/*' || null }} | |
- name: Upload spell check errors | |
uses: actions/upload-artifact@v4 | |
id: artifact-upload-step | |
with: | |
name: spell_check_errors | |
path: spell_check_errors.tsv | |
- name: Update template | |
if: ${{ github.event_name != 'pull_request' && steps.spell.outputs.error_count > 0 }} | |
env: | |
ERROR_COUNT: ${{ steps.spell.outputs.error_count }} | |
ARTIFACT_URL: ${{ steps.artifact-upload-step.outputs.artifact-url }} | |
run: | | |
sed -i "s@{{ERROR_COUNT}}@${ERROR_COUNT}@g" .github/cron-issue-templates/spellcheck-issue-template.md | |
sed -i "s@{{ARTIFACT_URL}}@${ARTIFACT_URL}@g" .github/cron-issue-templates/spellcheck-issue-template.md | |
- name: Post issue with spellcheck results | |
if: ${{ github.event_name != 'pull_request' && steps.spell.outputs.error_count > 0 }} | |
id: spellissue | |
uses: peter-evans/create-issue-from-file@v5 | |
with: | |
title: Monthly spellcheck results | |
content-filepath: .github/cron-issue-templates/spellcheck-issue-template.md | |
labels: | | |
OpenScPCA admin | |
spelling | |
- name: Fail if there are spelling errors | |
if: steps.spell.outputs.error_count > 0 | |
run: | | |
echo "There were ${{ steps.spell.outputs.error_count }} errors" | |
column -t spell_check_errors.tsv | |
exit 1 |