From cecc273f4b280b1cb3f9efbd363b27dc2decdafe Mon Sep 17 00:00:00 2001 From: Aaron Crawfis Date: Thu, 6 Jul 2023 09:56:38 -0700 Subject: [PATCH 1/7] Add output steps --- .github/workflows/spellcheck.yaml | 27 +++++++++++++++++++-------- 1 file changed, 19 insertions(+), 8 deletions(-) diff --git a/.github/workflows/spellcheck.yaml b/.github/workflows/spellcheck.yaml index 03a04fa3a..6c7e993d1 100644 --- a/.github/workflows/spellcheck.yaml +++ b/.github/workflows/spellcheck.yaml @@ -6,19 +6,14 @@ on: branches: - v*.* - edge - paths: - - 'docs/**' - - '.github/workflows/spellcheck.yaml' - - '.github/config/**' pull_request: types: [opened, synchronize, reopened] branches: - v*.* - edge - paths: - - 'docs/**' - - '.github/workflows/spellcheck.yaml' - - '.github/config/**' + +env: + ACTION_LINK: '${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}' jobs: build: @@ -31,3 +26,19 @@ jobs: uses: rojopolis/spellcheck-github-actions@0.27.0 with: config_path: .github/config/.pyspelling.yml + - name: Post GitHub workkflow output on failure + if: failure() + run: | + echo "## Spellcheck Failed" >> $GITHUB_STEP_SUMMARY + echo "There are spelling errors in your PR. Visit [the workflow output](${{ env.ACTION_LINK }}) to see what words are failing." >> $GITHUB_STEP_SUMMARY + echo "### Adding new words" >> $GITHUB_STEP_SUMMARY + echo "If you are adding a new custom word refer to the [docs guide](https://docs.radapp.dev/contributing/docs/#spelling)" >> $GITHUB_STEP_SUMMARY + - name: Post GitHub comment on failure + if: failure() + uses: peter-evans/create-or-update-comment@v3 + with: + body: | + ## Spellcheck Failed + There are spelling errors in your PR. Visit [the workflow output](${{ env.ACTION_LINK }}) to see what words are failing. + ### Adding new words + If you are adding a new custom word refer to the [docs guide](https://docs.radapp.dev/contributing/docs/#spelling) From 9c6d9d85602da724d329ed351ee11f4bf4437106 Mon Sep 17 00:00:00 2001 From: Aaron Crawfis Date: Thu, 6 Jul 2023 09:56:57 -0700 Subject: [PATCH 2/7] Add misspelled word --- docs/content/_index.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/content/_index.md b/docs/content/_index.md index ec2f4f5c1..af80978c3 100644 --- a/docs/content/_index.md +++ b/docs/content/_index.md @@ -15,7 +15,7 @@ Teams [describe their application]({{< ref appmodel-concept >}}) services and re Screenshot of a Radius applications diagram {{< /card >}} {{< card header="**Portable**" >}} -Radius applications and tooling are agnostic of platform, services, and infrastructure. +Radius azpplications and tooling are agnostic of platform, services, and infrastructure. From 2730d4ede135d6459d95d5b7a6b3f3e0a5e9732e Mon Sep 17 00:00:00 2001 From: Aaron Crawfis Date: Thu, 6 Jul 2023 10:06:24 -0700 Subject: [PATCH 3/7] Switch comment provider --- .github/workflows/spellcheck.yaml | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/.github/workflows/spellcheck.yaml b/.github/workflows/spellcheck.yaml index 6c7e993d1..19684acbc 100644 --- a/.github/workflows/spellcheck.yaml +++ b/.github/workflows/spellcheck.yaml @@ -29,16 +29,21 @@ jobs: - name: Post GitHub workkflow output on failure if: failure() run: | - echo "## Spellcheck Failed" >> $GITHUB_STEP_SUMMARY + echo "## :x: Spellcheck Failed" >> $GITHUB_STEP_SUMMARY echo "There are spelling errors in your PR. Visit [the workflow output](${{ env.ACTION_LINK }}) to see what words are failing." >> $GITHUB_STEP_SUMMARY echo "### Adding new words" >> $GITHUB_STEP_SUMMARY echo "If you are adding a new custom word refer to the [docs guide](https://docs.radapp.dev/contributing/docs/#spelling)" >> $GITHUB_STEP_SUMMARY + - name: Post GitHub workflow output on success + run: | + echo "## :white_check_mark: Spellcheck Passed" >> $GITHUB_STEP_SUMMARY + echo "There are no spelling errors in your PR." >> $GITHUB_STEP_SUMMARY - name: Post GitHub comment on failure if: failure() - uses: peter-evans/create-or-update-comment@v3 + uses: marocchino/sticky-pull-request-comment@v2 with: - body: | - ## Spellcheck Failed + recreate: true + message: | + ## :x: Spellcheck Failed There are spelling errors in your PR. Visit [the workflow output](${{ env.ACTION_LINK }}) to see what words are failing. ### Adding new words If you are adding a new custom word refer to the [docs guide](https://docs.radapp.dev/contributing/docs/#spelling) From 0103f24a8d13a81b27e4d94071d1f1ef456f4828 Mon Sep 17 00:00:00 2001 From: Aaron Crawfis Date: Thu, 6 Jul 2023 10:09:58 -0700 Subject: [PATCH 4/7] Clear comment on success --- .github/workflows/spellcheck.yaml | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/.github/workflows/spellcheck.yaml b/.github/workflows/spellcheck.yaml index 19684acbc..0ecbef8ba 100644 --- a/.github/workflows/spellcheck.yaml +++ b/.github/workflows/spellcheck.yaml @@ -41,9 +41,16 @@ jobs: if: failure() uses: marocchino/sticky-pull-request-comment@v2 with: + header: spellcheck recreate: true message: | ## :x: Spellcheck Failed There are spelling errors in your PR. Visit [the workflow output](${{ env.ACTION_LINK }}) to see what words are failing. ### Adding new words If you are adding a new custom word refer to the [docs guide](https://docs.radapp.dev/contributing/docs/#spelling) + - name: Clear GitHub comment on success + uses: marocchino/sticky-pull-request-comment@v2 + continue-on-error: true + with: + header: spellcheck + delete: true From f13f3ff7b0176458372dd2a96294927d37187a65 Mon Sep 17 00:00:00 2001 From: Aaron Crawfis Date: Thu, 6 Jul 2023 10:10:15 -0700 Subject: [PATCH 5/7] Rename job --- .github/workflows/spellcheck.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/spellcheck.yaml b/.github/workflows/spellcheck.yaml index 0ecbef8ba..24c76f2c8 100644 --- a/.github/workflows/spellcheck.yaml +++ b/.github/workflows/spellcheck.yaml @@ -16,7 +16,7 @@ env: ACTION_LINK: '${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}' jobs: - build: + spellcheck: name: Spellcheck runs-on: ubuntu-latest steps: From a42d288f20b0693fb1583d309440fc0c1b74f34c Mon Sep 17 00:00:00 2001 From: Aaron Crawfis Date: Thu, 6 Jul 2023 10:11:28 -0700 Subject: [PATCH 6/7] Add concurrency control --- .github/workflows/spellcheck.yaml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.github/workflows/spellcheck.yaml b/.github/workflows/spellcheck.yaml index 24c76f2c8..1e0530acf 100644 --- a/.github/workflows/spellcheck.yaml +++ b/.github/workflows/spellcheck.yaml @@ -15,6 +15,9 @@ on: env: ACTION_LINK: '${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}' +concurrency: + group: spellcheck-${{ github.ref }}-${{ github.event.pull_request.number || github.sha }} + jobs: spellcheck: name: Spellcheck From b7e05cc89c62be5ecefdd8f7f757cc9f58de13ad Mon Sep 17 00:00:00 2001 From: Aaron Crawfis Date: Thu, 6 Jul 2023 10:14:20 -0700 Subject: [PATCH 7/7] Fix spelling issue --- docs/content/_index.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/content/_index.md b/docs/content/_index.md index af80978c3..ec2f4f5c1 100644 --- a/docs/content/_index.md +++ b/docs/content/_index.md @@ -15,7 +15,7 @@ Teams [describe their application]({{< ref appmodel-concept >}}) services and re Screenshot of a Radius applications diagram {{< /card >}} {{< card header="**Portable**" >}} -Radius azpplications and tooling are agnostic of platform, services, and infrastructure. +Radius applications and tooling are agnostic of platform, services, and infrastructure.