diff --git a/.github/workflows/comment_bot.yml b/.github/workflows/comment_bot.yml index dd48f617..b36b7462 100644 --- a/.github/workflows/comment_bot.yml +++ b/.github/workflows/comment_bot.yml @@ -5,31 +5,15 @@ on: types: [created, edited, deleted] jobs: - run_actions: + run_tests: + name: Run tests if: ${{ github.event.issue.pull_request && github.event.comment.body == '/check' }} runs-on: [ubuntu-latest] - steps: - - name: Get PR SHA - id: sha - uses: actions/github-script@v4 - with: - result-encoding: string - script: | - const { owner, repo, number } = context.issue; - const pr = await github.pulls.get({ - owner, - repo, - pull_number: number, - }); - return pr.data.head.sha - - - name: Check out the repository - uses: actions/checkout@v3 - with: - ref: ${{ steps.sha.outputs.result }} - - - name: Run Tests - uses: ./.github/workflows/tests.yml - - - name: Run PR Title Check - uses: ./.github/workflows/conventional-prs.yml + uses: ./.github/workflows/tests.yml + secrets: inherit + check_title: + name: Check PR Title + if: ${{ github.event.issue.pull_request && github.event.comment.body == '/check' }} + runs-on: [ubuntu-latest] + uses: ./.github/workflows/conventional-prs.yml + secrets: inherit