diff --git a/.github/workflows/test.yaml b/.github/workflows/test.yaml index ea9c0f95..14dd0f5b 100644 --- a/.github/workflows/test.yaml +++ b/.github/workflows/test.yaml @@ -1,20 +1,19 @@ --- name: test -on: - pull_request: - types: [closed] - pull_request_review: - types: [submitted] +on: pull_request jobs: test: - if: | - endsWith(github.event.pull_request.user.login, '[bot]') && - ((github.event_name == 'pull_request_review' && github.event.review.state == 'approved') || - github.event_name == 'pull_request') runs-on: ubuntu-24.04 timeout-minutes: 15 - permissions: - pull-requests: write - contents: read + permissions: {} steps: - - uses: suzuki-shunsuke/notify-bot-pr-event-action@pr/1 + - id: create_token + uses: suzuki-shunsuke/tibdex-github-app-token@55429bbc082600559820fc71ef237b3f0e2a50a1 # v3.0.0 + with: + app_id: ${{ vars.APP_ID }} + private_key: ${{ secrets.APP_PRIVATE_KEY }} + - run: gh pr comment -R "$GITHUB_REPOSITORY" "$NUMBER" --body "$BODY" + env: + GH_TOKEN: ${{ steps.create_token.outputs.token }} + NUMBER: ${{ github.event.pull_request.number }} + BODY: hello