File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 88 - main
99 tags :
1010 - ' *'
11+ # allows rector-* package repositories to rebuild after their pull request is merged
12+ workflow_dispatch : null
1113
1214env :
1315 # see https://github.com/composer/composer/issues/9368#issuecomment-718112361
@@ -108,6 +110,8 @@ jobs:
108110 -
109111 name : " Get Git log"
110112 id : git-log
113+ # "before"/"after" exist only in the push event payload
114+ if : github.event_name == 'push'
111115 run : |
112116 echo "log<<EOF" >> $GITHUB_OUTPUT
113117 echo "$(git log ${{ github.event.before }}..${{ github.event.after }} --reverse --pretty='https://github.com/rectorphp/rector-src/commit/%H %s')" >> $GITHUB_OUTPUT
@@ -122,7 +126,8 @@ jobs:
122126 INPUT_LOG : ${{ steps.git-log.outputs.log }}
123127 run : |
124128 git add --all
125- git commit -m "Updated Rector to commit ${{ github.event.after }}" -m "$INPUT_LOG"
129+ # a dispatched build can produce no change at all, e.g. after a test-only pull request
130+ git diff --staged --quiet || git commit -m "Updated Rector to commit ${{ github.sha }}" -m "$INPUT_LOG"
126131 git push --quiet origin main
127132
128133 # 8.B publish it to remote repository with tag
You can’t perform that action at this time.
0 commit comments