-
-
Notifications
You must be signed in to change notification settings - Fork 3
38 lines (31 loc) · 1.03 KB
/
create_release_pr.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
name: create_release_pr
on:
schedule:
- cron: 0 6 * * 1
jobs:
create_pr:
runs-on: ubuntu-latest
steps:
- name: Checkout develop branch
uses: actions/checkout@v4
with:
ref: develop
- name: Set current datetime as env variable
env:
TZ: 'Asia/Tokyo'
run: echo "CURRENT_DATETIME=$(date +'%Y%m%d%H%M%S')" >> $GITHUB_ENV
- name: Create Branch
run: git checkout -b release/gha_${{ env.CURRENT_DATETIME }}
- name: Push Branch
run: git push origin release/gha_${{ env.CURRENT_DATETIME }}
- name: Install Hub
run: |
sudo apt-get update
sudo apt-get install -y hub
- name: Create Pull Request
env:
REVIEWERS: 'tokku5552'
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
BRANCH_NAME: release/gha_${{ env.CURRENT_DATETIME }}
run: |
hub pull-request -m "[bot(create_release_pr)]: created at ${{ env.CURRENT_DATETIME }}" -b main -h $BRANCH_NAME -r "$REVIEWERS"