Update pnpm to v11.5.0 #243
Workflow file for this run
This file contains hidden or 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: Auto Merge | |
| on: | |
| pull_request: | |
| types: [labeled] | |
| check_suite: | |
| types: [completed] | |
| concurrency: | |
| group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.event.check_suite.id }} | |
| cancel-in-progress: true | |
| jobs: | |
| auto-merge: | |
| runs-on: ubuntu-latest | |
| timeout-minutes: 5 | |
| if: >- | |
| (github.event_name == 'pull_request' && github.event.label.name == 'claude-auto') || | |
| github.event_name == 'check_suite' | |
| permissions: | |
| contents: read | |
| pull-requests: read | |
| steps: | |
| - name: GitHub App トークンの生成 | |
| id: app-token | |
| uses: actions/create-github-app-token@bcd2ba49218906704ab6c1aa796996da409d3eb1 # v3 | |
| with: | |
| app-id: ${{ secrets.GHA_APP_ID }} | |
| private-key: ${{ secrets.GHA_APP_PRIVATE_KEY }} | |
| - name: PR 番号の取得 | |
| id: pr | |
| env: | |
| GH_TOKEN: ${{ steps.app-token.outputs.token }} | |
| run: | | |
| if [ "${{ github.event_name }}" = "pull_request" ]; then | |
| echo "number=${{ github.event.pull_request.number }}" >> "$GITHUB_OUTPUT" | |
| else | |
| PR_NUMBER=$(gh api "repos/${{ github.repository }}/commits/${{ github.event.check_suite.head_sha }}/pulls" \ | |
| --jq '.[0].number // empty') | |
| echo "number=${PR_NUMBER}" >> "$GITHUB_OUTPUT" | |
| fi | |
| - name: claude-auto ラベルの確認 | |
| if: steps.pr.outputs.number != '' | |
| id: label-check | |
| env: | |
| GH_TOKEN: ${{ steps.app-token.outputs.token }} | |
| run: | | |
| HAS_LABEL=$(gh pr view "${{ steps.pr.outputs.number }}" \ | |
| --repo "${{ github.repository }}" \ | |
| --json labels --jq '[.labels[].name] | any(. == "claude-auto")') | |
| echo "has_label=${HAS_LABEL}" >> "$GITHUB_OUTPUT" | |
| - name: PR の approve | |
| if: steps.pr.outputs.number != '' && steps.label-check.outputs.has_label == 'true' | |
| env: | |
| GH_TOKEN: ${{ steps.app-token.outputs.token }} | |
| run: | | |
| gh pr review "${{ steps.pr.outputs.number }}" \ | |
| --repo "${{ github.repository }}" \ | |
| --approve \ | |
| --body "GitHub App による自動承認(claude-auto ラベル検出)" | |
| - name: auto-merge の有効化(squash) | |
| if: steps.pr.outputs.number != '' && steps.label-check.outputs.has_label == 'true' | |
| env: | |
| GH_TOKEN: ${{ steps.app-token.outputs.token }} | |
| run: | | |
| gh pr merge "${{ steps.pr.outputs.number }}" \ | |
| --repo "${{ github.repository }}" \ | |
| --squash \ | |
| --auto |