From d793144695ab655339160ea39a5a609de1693c15 Mon Sep 17 00:00:00 2001 From: Aaron Powell Date: Wed, 2 Jul 2025 20:46:26 +1000 Subject: [PATCH] Handling workflow runs from external contributors --- .github/workflows/validate-readme.yml | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/.github/workflows/validate-readme.yml b/.github/workflows/validate-readme.yml index e469a65..94e8db0 100644 --- a/.github/workflows/validate-readme.yml +++ b/.github/workflows/validate-readme.yml @@ -43,8 +43,17 @@ jobs: echo "EOF" >> $GITHUB_OUTPUT fi + - name: Output diff to logs for non-write users + if: steps.check-diff.outputs.status == 'failure' && github.event.pull_request.head.repo.permissions.push != true + run: | + echo "::group::README.md diff (changes needed)" + echo "The following changes need to be made to README.md:" + echo "" + git diff README.md + echo "::endgroup::" + - name: Comment on PR if README.md needs updating - if: steps.check-diff.outputs.status == 'failure' + if: steps.check-diff.outputs.status == 'failure' && github.event.pull_request.head.repo.permissions.push == true uses: marocchino/sticky-pull-request-comment@v2 with: header: readme-validation