Skip to content

Commit

Permalink
PR生成後に他のワークフローがトリガーしない問題を解消
Browse files Browse the repository at this point in the history
  • Loading branch information
t-yng committed Oct 14, 2023
1 parent 02ca6e1 commit 9bf894b
Showing 1 changed file with 11 additions and 1 deletion.
12 changes: 11 additions & 1 deletion .github/workflows/create_release_pr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -44,13 +44,23 @@ jobs:
git add package.json
git commit -m "chore: release ${{ env.NEW_VERSION }}"
- name: Generate GitHub App Token
uses: tibdex/github-app-token@v1
id: generate-token
with:
app_id: ${{ secrets.RELEASE_APP_ID }}
private_key: ${{ secrets.RELEASE_APP_CLIENT_SECRET }}

- name: Create Pull Request
id: cpr
uses: peter-evans/create-pull-request@v5
with:
branch: release/v${{ env.NEW_VERSION }}
branch: release/${{ env.NEW_VERSION }}
title: release ${{ env.NEW_VERSION }}
labels: release
# GITHUB_TOKENでは権限が足りなくPR生成後に他のワークフローがトリガーされないため、GitHub App Tokenを使用
# @see: https://github.com/peter-evans/create-pull-request/issues/48#issuecomment-536184102
token: ${{ steps.generate-token.outputs.token }}

- name: Enable Pull Request Automerge
run: gh pr merge --merge --auto "${{ steps.cpr.outputs.pull-request-number }}"
Expand Down

0 comments on commit 9bf894b

Please sign in to comment.