From bf7a52ec8c76179f68b8bcd713584d328de03843 Mon Sep 17 00:00:00 2001 From: Toran Bruce Richards Date: Sun, 2 Apr 2023 10:56:23 +0100 Subject: [PATCH] ... --- .github/workflows/auto_format.yml | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/.github/workflows/auto_format.yml b/.github/workflows/auto_format.yml index 8bfff91c..a620d816 100644 --- a/.github/workflows/auto_format.yml +++ b/.github/workflows/auto_format.yml @@ -4,16 +4,17 @@ jobs: format: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v1 - with: - ref: ${{ github.event.pull_request.head.ref }} + - name: Checkout PR branch + run: | + git fetch origin pull/${{ github.event.pull_request.number }}/head:${{ github.event.pull_request.head.ref }} + git checkout ${{ github.event.pull_request.head.ref }} - name: autopep8 uses: peter-evans/autopep8@v1 with: args: --exit-code --recursive --in-place --aggressive --aggressive . - name: Check for modified files id: git-check - run: echo "modified=$(if git diff-index --quiet HEAD --; then echo "false"; else echo "true"; fi)" >> $GITHUB_OUTPUT + run: echo "modified=$(if git diff-index --quiet HEAD --; then echo "false"; else echo "true"; fi)" >> $GITHUB_ENV - name: Push changes if: steps.git-check.outputs.modified == 'true' run: |