Merge pull request #368 from tokku5552/release/gha_20240219150323 #37
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: create_pr_main_to_develop | |
on: | |
push: | |
branches: | |
- main | |
jobs: | |
create_pr: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout main branch | |
uses: actions/checkout@v4 | |
with: | |
ref: main | |
- 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 merge/gha_${{ env.CURRENT_DATETIME }} | |
- name: Push Branch | |
run: git push origin merge/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: merge/gha_${{ env.CURRENT_DATETIME }} | |
run: | | |
hub pull-request -m "[bot(create_pr_main_to_develop)]: created at ${{ env.CURRENT_DATETIME }}" -b develop -h $BRANCH_NAME -r "$REVIEWERS" |