Skip to content

Merge pull request #4477 from dev-hato/renovate/dev-hato-actions-form… #2714

Merge pull request #4477 from dev-hato/renovate/dev-hato-actions-form…

Merge pull request #4477 from dev-hato/renovate/dev-hato-actions-form… #2714

---
name: pr-release-hato-bot
on:
push:
branches:
- develop
jobs:
# リリース用のPRを作成するjob
pr-release:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
with:
fetch-depth: 0
- name: Set up Node.js
uses: actions/setup-node@0a44ba7841725637a19e28fa30b79a866c81b0a6 # v4.0.4
with:
cache: npm
node-version-file: package.json
- run: npm ci
- name: Get diff
id: get_diff
run: bash "${GITHUB_WORKSPACE}/scripts/pr_release_hato_bot/pr_release/get_diff.sh"
- name: Get PullRequests
uses: actions/github-script@60a0d83039c74a4aee543508d2ffcb1c3799cdea # v7.0.1
if: ${{ steps.get_diff.outputs.result != '' }}
id: get_pull_requests
with:
github-token: ${{secrets.GITHUB_TOKEN}}
script: |
const {tsImport} = require('tsx/esm/api')
const {script} = await tsImport(
'./scripts/get_pull_requests_hato_bot.ts',
process.env.GITHUB_WORKSPACE + '/'
)
return await script(github, context)
- name: Create PullRequest
uses: actions/github-script@60a0d83039c74a4aee543508d2ffcb1c3799cdea # v7.0.1
if: ${{ steps.get_diff.outputs.result != '' && steps.get_pull_requests.outputs.result == 0 }}
with:
github-token: ${{secrets.GITHUB_TOKEN}}
script: |
const {tsImport} = require('tsx/esm/api')
const {script} = await tsImport(
'./scripts/pr_release_hato_bot/pr_release/create_pull_request.ts',
process.env.GITHUB_WORKSPACE + '/'
)
await script(github, context)
concurrency:
group: ${{ github.workflow }}-${{ github.event_name }}-${{ github.ref }}
cancel-in-progress: true