From e15b77167156ec31d1c0e29fa571394a00f6869a Mon Sep 17 00:00:00 2001 From: "Federico M. Facca" Date: Tue, 10 Oct 2023 13:16:01 +0200 Subject: [PATCH 1/4] fix condition * fix condition * check for changes --- .github/workflows/markdown.yaml | 13 +++++++------ RELEASE_NOTES.md | 3 ++- 2 files changed, 9 insertions(+), 7 deletions(-) diff --git a/.github/workflows/markdown.yaml b/.github/workflows/markdown.yaml index c889794d..9d0e7ddc 100644 --- a/.github/workflows/markdown.yaml +++ b/.github/workflows/markdown.yaml @@ -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 @@ -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: | @@ -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: diff --git a/RELEASE_NOTES.md b/RELEASE_NOTES.md index 4eafb176..d98fc1be 100644 --- a/RELEASE_NOTES.md +++ b/RELEASE_NOTES.md @@ -4,6 +4,7 @@ ### Features +- markdown workflow: add optional spell checker (PR #44 by @chicco785) - add-to-project workflow: add support to assign multiple teams as reviewers (comma separated without space) (PR #42 by @chicco785) - Add Docker, Golang and Docker Clean Up workflows (PR #54 by @cosimomeli) @@ -13,7 +14,6 @@ to `🔖 Ready` (PR #50 by @chicco785) - markdown workflow: exclude `vendor` folder from links check (PR #47 by @tejo) - markdown workflow: exclude `vendor` folder from checks (PR #46 by @tejo) -- markdown workflow: add optional spell checker (PR #44 by @chicco785) - add-to-project workflow: automatically add reviewers without need of CODEOWNERS (PR #37 by @chicco785) - add-to-project workflow: automatically assign pr to its creator (PR #36 by @@ -26,6 +26,7 @@ ### Bug Fixes +- markdown workflow: fix test on usage of 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 From 7d8a85ac6ed8e6daea711f5b49838cb26b55e3c3 Mon Sep 17 00:00:00 2001 From: chicco785 Date: Tue, 10 Oct 2023 14:35:23 +0000 Subject: [PATCH 2/4] docs(release_notes): update RELEASE_NOTES.md --- RELEASE_NOTES.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/RELEASE_NOTES.md b/RELEASE_NOTES.md index d98fc1be..433cd6df 100644 --- a/RELEASE_NOTES.md +++ b/RELEASE_NOTES.md @@ -26,7 +26,8 @@ ### Bug Fixes -- markdown workflow: fix test on usage of spellchecker (PR #55 by @chicco785) +- 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 From 064cc6f9aa50a3616249e7b85ede8dddbeb7a682 Mon Sep 17 00:00:00 2001 From: "Federico M. Facca" Date: Tue, 10 Oct 2023 16:36:29 +0200 Subject: [PATCH 3/4] update doc --- README.MD | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/README.MD b/README.MD index 1b97c4c8..22b321f8 100644 --- a/README.MD +++ b/README.MD @@ -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 From 6dff06abadb8ea49e87a1998abcb1851bb3c0fbc Mon Sep 17 00:00:00 2001 From: chicco785 Date: Tue, 10 Oct 2023 14:45:31 +0000 Subject: [PATCH 4/4] docs(release_notes): update RELEASE_NOTES.md --- RELEASE_NOTES.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/RELEASE_NOTES.md b/RELEASE_NOTES.md index c86bc213..002175d5 100644 --- a/RELEASE_NOTES.md +++ b/RELEASE_NOTES.md @@ -27,10 +27,10 @@ ### Bug Fixes -- markdown workflow: fix check to enable/disable spellchecker (PR #55 by - @chicco785) - 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