File tree Expand file tree Collapse file tree 1 file changed +36
-0
lines changed Expand file tree Collapse file tree 1 file changed +36
-0
lines changed Original file line number Diff line number Diff line change 1+ name : Dependencies Automatic Update
2+ on :
3+ workflow_dispatch :
4+
5+ jobs :
6+ update-autogen-files :
7+ runs-on : ubuntu-latest
8+ permissions :
9+ pull-requests : write
10+ env :
11+ GH_TOKEN : ${{ secrets.GITHUB_TOKEN }}
12+
13+ steps :
14+ - uses : actions/checkout@v4
15+ - uses : actions/setup-node@v4.0.1
16+ - run : |
17+ rm package-lock.json
18+ npm i
19+ - run : |
20+ git switch -c autoupdate
21+ gh auth setup-git
22+ git config user.email "cicada1003@gmail.com"
23+ git config user.name "auto-update bot"
24+ git add .
25+ if [[ $(git diff --cached) ]]
26+ then
27+ git commit -m"Dependencies Auto Update"
28+ git push -u origin autoupdate
29+ fi
30+ PRS=$(gh pr list --json id -H autoupdate -s open)
31+ if [ "$PRS" == '[]' ]
32+ then
33+ gh pr create --base master --fill
34+ else
35+ echo "$PRS"
36+ fi
You can’t perform that action at this time.
0 commit comments