File tree Expand file tree Collapse file tree 1 file changed +22
-0
lines changed Expand file tree Collapse file tree 1 file changed +22
-0
lines changed Original file line number Diff line number Diff line change 2626 - name : task generate
2727 run : |
2828 task generate --verbose
29+
30+ if [[ "${{ github.event_name }}" == "pull_request" ]]; then
31+ PR_USER=$(jq -r .pull_request.user.login "$GITHUB_EVENT_PATH")
32+ if [ "$PR_USER" = "renovate[bot]" ]; then
33+ echo "attempting to commit generated files"
34+
35+ AUTHOR_NAME=$(git log -1 --pretty=format:'%an')
36+ AUTHOR_EMAIL=$(git log -1 --pretty=format:'%ae')
37+ echo "Committing as $AUTHOR_NAME <$AUTHOR_EMAIL>"
38+
39+ echo "AUTHOR_NAME=$AUTHOR_NAME" >> $GITHUB_ENV
40+ echo "AUTHOR_EMAIL=$AUTHOR_EMAIL" >> $GITHUB_ENV
41+
42+ git config user.name "$AUTHOR_NAME"
43+ git config user.email "$AUTHOR_EMAIL"
44+
45+ git add -A
46+ git commit -m "chore: regenerate files" || echo "No changes to commit"
47+ git push origin "${{ github.head_ref }}" || echo "No changes to push"
48+ fi
49+ fi
50+
2951 git diff --exit-code
3052
3153 - name : task validate
You can’t perform that action at this time.
0 commit comments