diff --git a/.github/workflows/smoke.yaml b/.github/workflows/smoke.yaml index 7432f235..b9703774 100644 --- a/.github/workflows/smoke.yaml +++ b/.github/workflows/smoke.yaml @@ -4,11 +4,7 @@ name: "Run smoke tests via Tox::pytest (python 3.11)" # These tests will be long running and require accelerated hardware. on: - workflow_dispatch: - inputs: - branch: - type: string - default: main + workflow_dispatch: {} # using this rather than pull_request because this workflow # needs to run in the context of the base branch (main) and # access the repo's secrets to start the AWS instances. @@ -115,7 +111,13 @@ jobs: uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 with: fetch-depth: 0 - ref: ${{inputs.branch}} + + - name: "Fetch and checkout PR" + # Needed because this workflow runs on pull_request_target which runs on the base branch (e.g. main) + if: ${{ github.event_name == 'pull_request_target'}} + run: | + git fetch origin pull/${{ github.event.number }}/head:pr-${{ github.event.number }} + git checkout pr-${{ github.event.number }} - name: Run smoke tests uses: ./.github/actions/run-smoke