File tree 2 files changed +36
-34
lines changed
2 files changed +36
-34
lines changed Original file line number Diff line number Diff line change
1
+ name : Auto Create PR from dev to master
2
+
3
+ on :
4
+ schedule :
5
+ # 每周四北京时间21点触发(UTC时间13点)
6
+ - cron : ' 0 13 * * 4'
7
+ workflow_dispatch :
8
+
9
+ jobs :
10
+ create-pr :
11
+ runs-on : ubuntu-latest
12
+ steps :
13
+ - name : Checkout code
14
+ uses : actions/checkout@v4
15
+
16
+ - name : Install GitHub CLI
17
+ run : |
18
+ sudo apt-get update
19
+ sudo apt-get install -y curl
20
+ curl -fsSL https://cli.github.com/packages/githubcli-archive-keyring.gpg | sudo dd of=/usr/share/keyrings/githubcli-archive-keyring.gpg
21
+ echo "deb [arch=$(dpkg --print-architecture) signed-by=/usr/share/keyrings/githubcli-archive-keyring.gpg] https://cli.github.com/packages stable main" | sudo tee /etc/apt/sources.list.d/github-cli.list > /dev/null
22
+ sudo apt-get update
23
+ sudo apt-get install -y gh
24
+
25
+ - name : Create Pull Request
26
+ env :
27
+ GH_TOKEN : ${{ secrets.GITHUB_TOKEN }}
28
+ TZ : Asia/Shanghai
29
+ run : |
30
+ CURRENT_DATE=$(date +%Y.%m.%d)
31
+ gh pr create \
32
+ --base master \
33
+ --head dev \
34
+ --title "Automated PR $CURRENT_DATE" \
35
+ --body "Automated PR created by GitHub Actions. Merge dev into master" \
36
+ --label automated
Load Diff This file was deleted.
You can’t perform that action at this time.
0 commit comments