diff --git a/.github/workflows/openai.yml b/.github/workflows/openai.yml index 1e0ecca7d2a..bb63bc6659c 100644 --- a/.github/workflows/openai.yml +++ b/.github/workflows/openai.yml @@ -4,7 +4,7 @@ name: OpenAI on: - pull_request: + pull_request_target: branches: ['main'] paths: - 'autogen/**' @@ -25,7 +25,11 @@ jobs: runs-on: ${{ matrix.os }} environment: openai steps: - - uses: actions/checkout@v3 + # checkout to pr branch + - name: Checkout + uses: actions/checkout@v3 + with: + ref: ${{ github.event.pull_request.head.sha }} - name: Set up Python ${{ matrix.python-version }} uses: actions/setup-python@v4 with: