ci apply my updates to the verify-formatting action
@@ -21,4 +21,19 @@ jobs:
run: python code-format.py
working-directory: scripts
- name: Check that repository is clean
- run: git diff --exit-code --color=always || (echo "Please apply the preceding diff to your code or run scripts/code-format.sh"; false)
+ shell: bash
+ run: |
+ set -o pipefail
+ if ! (git diff --exit-code --color=always | tee /tmp/lvgl_diff.patch); then
+ echo "Please apply the preceding diff to your code or run scripts/code-format.sh"
+ exit 1
+ fi
+ - name: Comment PR
+ uses: thollander/actions-comment-pull-request@v1
+ if: github.event_name == 'pull_request' && failure()
+ with:
+ message: |
+ Your PR needs its formatting corrected before it can be merged upstream.
+
+ Please comment `@lvgl-bot format` if you would like our bot to commit this change for you.
+ GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
