From 0cb5408df7b61a4da48e5170f13db7774423c206 Mon Sep 17 00:00:00 2001 From: "Jack Pettit [SSW]" <57518417+JackDevAU@users.noreply.github.com> Date: Wed, 8 Nov 2023 14:59:48 +1000 Subject: [PATCH] update --- .github/workflows/validate-markdown.yml | 37 +------------------------ 1 file changed, 1 insertion(+), 36 deletions(-) diff --git a/.github/workflows/validate-markdown.yml b/.github/workflows/validate-markdown.yml index c1891faa12f..478770c9891 100644 --- a/.github/workflows/validate-markdown.yml +++ b/.github/workflows/validate-markdown.yml @@ -23,43 +23,8 @@ jobs: token: ${{ secrets.GITHUB_TOKEN }} ref: ${{ github.event.pull_request.head.ref }} repository: ${{ github.event.pull_request.head.repo.full_name }} - - # # Step 2: Set up the Node.js environment. - # - uses: actions/setup-node@v3 - - # Step 3: Get the list of changed files in the PR - - name: Get changed files - id: get_changed - if: ${{ github.event_name == 'pull_request' }} - run: | - echo "changed=$(git diff --name-only $(git merge-base origin/main HEAD) HEAD)" | paste -sd "," - >> $GITHUB_ENV - echo "pr_owner=${{ github.event.pull_request.user.login }}" >> $GITHUB_ENV - - # Step 4: Lint + Validate Markdown files - - name: Lint Markdown - id: check_markdown - uses: articulate/actions-markdownlint@v1 + - uses: articulate/actions-markdownlint@v1 with: config: ./.markdownlint/config.json files: ${{ env.changed }} ignore: node_modules - - # Step 5: Write workflow job summary if the previous step failed - - name: Add Job Summary - if: failure() - run: | - echo "Hi @$pr_owner," >> $GITHUB_STEP_SUMMARY - echo "${{ steps.check_markdown.outputs.stdout }}" >> $GITHUB_STEP_SUMMARY - - # Step 6: Leave a comment if the validation has failed and if it's not a PR from a fork - - name: Comment on PR - if: failure() && github.event.pull_request.head.repo.fork == false - uses: mshick/add-pr-comment@v2 - with: - message: | - Hi @${{ env.pr_owner }}, - ${{ steps.check_markdown.outputs.stdout }} - Please fix your Markdown files. - repo-token: ${{ secrets.GITHUB_TOKEN }} - repo-token-user-login: "github-actions[bot]" - allow-repeats: true \ No newline at end of file