Skip to content

Commit d84d2b9

Browse files
committed
ci: use peter-evans/create-pull-reques
1 parent 59c8ea8 commit d84d2b9

File tree

1 file changed

+17
-19
lines changed

1 file changed

+17
-19
lines changed

.github/workflows/auto-update.yml

Lines changed: 17 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -14,29 +14,27 @@ jobs:
1414
permissions:
1515
contents: write
1616
steps:
17-
- uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
18-
with:
19-
persist-credentials: true
17+
- uses: taiki-e/checkout-action@b13d20b7cda4e2f325ef19895128f7ff735c0b3d # v1.3.1
2018

2119
- uses: oxc-project/setup-rust@cd82e1efec7fef815e2c23d296756f31c7cdc03d # v1.0.0
2220

2321
- name: Run xtask to update globals
2422
run: cargo run -p xtask
2523

26-
- name: Check for changes
27-
id: verify-changed-files
28-
run: |
29-
if [ -n "$(git status --porcelain)" ]; then
30-
echo "changed=true" >> $GITHUB_OUTPUT
31-
else
32-
echo "changed=false" >> $GITHUB_OUTPUT
33-
fi
24+
- uses: peter-evans/create-pull-request@271a8d0340265f705b14b6d32b9829c1cb33d45e # v7.0.8
25+
id: cpr
26+
with:
27+
token: ${{ secrets.OXC_BOT_PAT }}
28+
commit-message: Auto update globals from upstream
29+
branch: update
30+
branch-suffix: timestamp
31+
title: Auto update globals from upstream
32+
assignees: Boshen
33+
base: main
3434

35-
- name: Commit and push changes
36-
if: ${{ steps.verify-changed-files.outputs.changed == 'true' }}
37-
run: |
38-
git config --global user.email "github-actions[bot]@users.noreply.github.com"
39-
git config --global user.name "github-actions"
40-
git add .
41-
git commit -m "Auto update globals from upstream"
42-
git push
35+
- uses: peter-evans/enable-pull-request-automerge@a660677d5469627102a1c1e11409dd063606628d # v3
36+
if: steps.cpr.outputs.pull-request-operation == 'created'
37+
with:
38+
token: ${{ secrets.OXC_BOT_PAT }}
39+
pull-request-number: ${{ steps.cpr.outputs.pull-request-number }}
40+
merge-method: squash

0 commit comments

Comments
 (0)