Merge pull request #2561 from dev-hato/develop #21
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: pr-master-to-develop-hato-bot | |
on: | |
push: | |
branches: | |
- master | |
jobs: | |
# masterにコミットがpushされたら、それをdevelopに反映するPRを作成するjob | |
# masterとdevelopの間でコミットログに差異が出ないようにする | |
pr-master-to-develop: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1 | |
with: | |
fetch-depth: 0 | |
- name: Get PullRequests | |
uses: actions/github-script@60a0d83039c74a4aee543508d2ffcb1c3799cdea # v7.0.1 | |
id: get_pull_requests | |
with: | |
github-token: ${{secrets.GITHUB_TOKEN}} | |
script: | | |
const script = require(`${process.env.GITHUB_WORKSPACE}/scripts/get_pull_requests_hato_bot.js`) | |
return await script({github, context}) | |
- name: Create PullRequest | |
uses: actions/github-script@60a0d83039c74a4aee543508d2ffcb1c3799cdea # v7.0.1 | |
if: ${{ steps.get_pull_requests.outputs.result == 0 }} | |
with: | |
github-token: ${{secrets.GITHUB_TOKEN}} | |
script: | | |
const script = require(`${process.env.GITHUB_WORKSPACE}/scripts/pr_merge_develop_hato_bot/pr_master_to_develop/create_pull_request.js`) | |
await script({github, context}) | |
concurrency: | |
group: ${{ github.workflow }}-${{ github.event_name }}-${{ github.ref }} | |
cancel-in-progress: true |