@@ -14,29 +14,27 @@ jobs:
14
14
permissions :
15
15
contents : write
16
16
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
20
18
21
19
- uses : oxc-project/setup-rust@cd82e1efec7fef815e2c23d296756f31c7cdc03d # v1.0.0
22
20
23
21
- name : Run xtask to update globals
24
22
run : cargo run -p xtask
25
23
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
34
34
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