diff --git a/.github/workflows/autotools.yml b/.github/workflows/autotools.yml index 9299a4b77..b890f7ae2 100644 --- a/.github/workflows/autotools.yml +++ b/.github/workflows/autotools.yml @@ -23,4 +23,18 @@ jobs: run: | for i in `find . -name configure`; do sed -i 's/From configure.ac .*//' $i; done - name: Check diff - run: git diff | tee .gitdiff && cat .gitdiff && if [ -s .gitdiff ]; then exit 1; fi + run: | + git diff | tee .gitdiff + if [ "${{ github.event_name }}" = "pull_request" ]; then + if [ -s .gitdiff ]; then + gh pr edit "${{ github.event.number }}" --add-label "misc/runautotools" + else + gh pr edit "${{ github.event.number }}" --remove-label "misc/runautotools" + fi + else + if [ -s .gitdiff ]; then + exit 1 + fi + fi + env: + NUMBER: {% raw %}${{ github.event.number }}{% endraw %}