diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 42e9f23..bdfcf05 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -24,13 +24,18 @@ jobs: steps: - name: Generate a token id: generate_token + if: github.ref == 'refs/heads/main' uses: tibdex/github-app-token@v2 with: app_id: ${{ secrets.APP_ID_ADMIN_GITHUB }} private_key: ${{ secrets.APP_PRIVATE_KEY_ADMIN_GITHUB }} - uses: actions/checkout@v4 + if: github.ref == 'refs/heads/main' with: token: ${{ steps.generate_token.outputs.token }} + - uses: actions/checkout@v4 + if: github.ref != 'refs/heads/main' + - name: Verify Conventional Commits uses: amannn/action-semantic-pull-request@v5 if: github.event_name == 'pull_request' || github.event_name == 'pull_request_target'