From 89528d14168e714c12e5b2236f9e5e6c4a474eaf Mon Sep 17 00:00:00 2001 From: cicdguy <26552821+cicdguy@users.noreply.github.com> Date: Fri, 28 Jul 2023 07:14:29 -0500 Subject: [PATCH] Disable annotations by default --- .github/workflows/grammar.yaml | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/.github/workflows/grammar.yaml b/.github/workflows/grammar.yaml index 58bd1c29..46788fe1 100644 --- a/.github/workflows/grammar.yaml +++ b/.github/workflows/grammar.yaml @@ -21,6 +21,11 @@ on: required: false default: false type: boolean + enable-annotations: + description: Enable creation of GitHub annotations + required: false + default: false + type: boolean concurrency: group: grammar-${{ github.event.pull_request.number || github.ref }} cancel-in-progress: true @@ -116,12 +121,15 @@ jobs: - name: Check whether annotations exist 💭 id: check-annotations + if: inputs.enable-annotations uses: andstor/file-existence-action@v2 with: files: "annotations.json" - name: Annotate files for grammar suggestions ✍️ - if: steps.check-annotations.outputs.files_exists == 'true' + if: > + steps.check-annotations.outputs.files_exists == 'true' + && inputs.enable-annotations uses: kibalabs/github-action-create-annotations@v0.2.0 with: github-token: ${{ secrets.GITHUB_TOKEN }}