diff --git a/.github/workflows/acceptance-test.yml b/.github/workflows/acceptance-test.yml index ae1e0c0..be8202e 100644 --- a/.github/workflows/acceptance-test.yml +++ b/.github/workflows/acceptance-test.yml @@ -29,6 +29,26 @@ jobs: steps: - name: Base checkout uses: actions/checkout@v4 + if: | + github.event_name != 'repository_dispatch' && + ( + github.ref == 'refs/heads/main' || + ( + github.event_name == 'pull_request' && + github.event.pull_request.head.repo.full_name == github.repository + ) + ) + - name: Fork based /ok-to-test checkout + uses: actions/checkout@v4 + with: + ref: ${{ github.event.client_payload.pull_request.head.sha }} + if: | + github.event_name == 'repository_dispatch' && + github.event.client_payload.slash_command.args.named.sha != '' && + contains( + github.event.client_payload.pull_request.head.sha, + github.event.client_payload.slash_command.args.named.sha + ) - name: Launch 1Password Connect instance if: ${{ matrix.auth == 'connect' }} env: