pr-copy-ci-sudden-death #2511
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-copy-ci-sudden-death | |
on: | |
workflow_dispatch: | |
push: | |
branches: | |
- master | |
jobs: | |
# hato-botのCIの差分がpushされたらPRを作成する | |
pr-copy-ci: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Generate a token | |
id: generate_token | |
uses: actions/create-github-app-token@31c86eb3b33c9b601a1f60f98dcbfd1d70f379b4 # v1.10.3 | |
with: | |
app-id: ${{ secrets.PROJECT_AUTOMATION_APP_ID }} | |
private-key: ${{ secrets.PROJECT_AUTOMATION_PRIVATE_KEY }} | |
- uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7 | |
with: | |
fetch-depth: 0 | |
path: sudden-death | |
ref: ${{ github.sha }} | |
token: ${{steps.generate_token.outputs.token}} | |
- uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7 | |
with: | |
fetch-depth: 0 | |
repository: ${{ github.repository_owner }}/hato-bot | |
path: hato-bot | |
- name: Copy CI | |
run: bash "${GITHUB_WORKSPACE}/sudden-death/scripts/pr_copy_ci_sudden_death/pr_copy_ci/copy_ci.sh" | |
- name: Copy package.json | |
uses: actions/github-script@60a0d83039c74a4aee543508d2ffcb1c3799cdea #v7.0.1 | |
with: | |
script: | | |
const script = require(`${process.env.GITHUB_WORKSPACE}/sudden-death/scripts/pr_copy_ci_sudden_death/pr_copy_ci/copy_package.js`) | |
script() | |
- uses: dev-hato/actions-diff-pr-management@128afc4203b4e391e03868be91c987b2ddba7ea5 # v1.1.12 | |
with: | |
github-token: ${{steps.generate_token.outputs.token}} | |
branch-name-prefix: pr-copy-ci | |
pr-title-prefix: hato-botのCIを反映するよ! | |
working-directory: sudden-death | |
exit-failure: 'false' | |
concurrency: | |
group: ${{ github.workflow }}-${{ github.event_name }}-${{ github.ref }} | |
cancel-in-progress: true |