Skip to content

Commit 5357a2a

Browse files
authored
Allow renovate PR to have un committed changes (#1489)
I've found CI always fails when renovate updates git submodule... If there is un-committed changes by renovate PR(= new code will be generated by openapi generator), I think we can allow this. Finally github actions open PR after the PR by renovate is merged. Another way is to make renovate to run script to generate code again, but the cost is a little bit high.(https://docs.renovatebot.com/configuration-options/#postupgradetasks) The situation won't get bad even when we merge this change, so let me merge this change.
1 parent ac6f5c7 commit 5357a2a

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

.github/workflows/generate-code.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,8 +31,8 @@ jobs:
3131
diff=$(git --no-pager diff --name-only HEAD)
3232
echo "DIFF_IS_EMPTY=$([[ -z "$diff" ]] && echo 'true' || echo 'false')" >> $GITHUB_ENV
3333
echo "CURRENT_DATETIME=$(date +'%Y%m%d%H%M%S')" >> $GITHUB_ENV
34-
## Run if diff exists and pull request, and make CI status failure
35-
- if: ${{ github.event_name == 'pull_request' && env.DIFF_IS_EMPTY != 'true' }}
34+
## Run if diff exists and pull request, and make CI status failure (but allow renovate bot)
35+
- if: ${{ github.event_name == 'pull_request' && env.DIFF_IS_EMPTY != 'true' && github.actor != 'renovate[bot]' }}
3636
run: |
3737
echo "There are changes in the generated codes. Please run 'generate-code.py' and commit the changes." >&2
3838
exit 1

0 commit comments

Comments
 (0)