Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

markdown workflow: fix check to enable/disable spellchecker #55

Merged
merged 6 commits into from
Oct 11, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 7 additions & 6 deletions .github/workflows/markdown.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,9 @@ on:
- main
workflow_call:
inputs:
enable-spell-check:
skip-spell-check:
required: false
default: false
default: true
type: boolean
config-links-path:
required: false
Expand Down Expand Up @@ -77,7 +77,7 @@ jobs:
uses: DavidAnson/markdownlint-cli2-action@v11
with:
fix: true
config: ${{ github.event_name == 'workflow_call' && inputs.config-lint-path || '.github/config/.markdownlint.json' }}
config: ${{ inputs.config-lint-path || '.github/config/.markdownlint.json' }}
globs: ${{ inputs.md-lint-globs || '**/*.{md,MD}' }}
- name: Commit markdown-lint changes
run: |
Expand All @@ -90,17 +90,18 @@ jobs:
- name: Check links (.md)
uses: gaurav-nelson/github-action-markdown-link-check@v1
with:
config-file: ${{ github.event_name == 'workflow_call' && inputs.config-link-path || '.github/config/md-link-config.json' }}
config-file: ${{ inputs.config-link-path || '.github/config/md-link-config.json' }}
use-verbose-mode: 'yes'
- name: Check links (.MD)
uses: gaurav-nelson/github-action-markdown-link-check@v1
with:
config-file: ${{ github.event_name == 'workflow_call' && inputs.config-link-path || '.github/config/md-link-config.json' }}
config-file: ${{ inputs.config-link-path || '.github/config/md-link-config.json' }}
use-verbose-mode: 'yes'
file-extension: '.MD'
markdown-spellchecker:
if: ${{ (github.event_name == 'workflow_call' && inputs.enable-spell-check) || github.event_name != 'workflow_call' }}
runs-on: ubuntu-latest
needs: changes
if: ${{ needs.changes.outputs.files-changed == 'true' && (!inputs.skip-spell-check || inputs.skip-spell-check == '') }}
steps:
- uses: actions/checkout@v3
with:
Expand Down
3 changes: 2 additions & 1 deletion README.MD
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,8 @@ The repository includes:
- [clean-up-storage](.github/workflows/clean-up-storage.yaml) workflow: when a
new PR is closed, related cache and artefact are deleted.
- [markdown](.github/workflows/markdown.yaml) workflow: lint all markdown
documents and checks that links referenced in the documents are valid.
documents and checks that links referenced in the documents are valid. If
`skip-spell-check: false`, also a spell checker is executed.
- [release-notes](.github/workflows/release-notes.yaml) workflow: automatically
updates release notes using PR titles and labels.
- [golang](.github/workflows/golang.yaml) workflow: lint, test and benchmark Go
Expand Down
2 changes: 2 additions & 0 deletions RELEASE_NOTES.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,8 @@

- golang workflow: add shell configuration to enable `pipefail` for benchmark
job (PR #56 by @cosimomeli)
- markdown workflow: fix check to enable/disable spellchecker (PR #55 by
@chicco785)
- add-to-project workflow: Fix assignment of reviewers also when PR is still in
draft mode (PR #40 by @chicco785)
- Release-notes workflow: fix default configuration to include only current PR
Expand Down