diff --git a/.github/workflows/e2e-test-manual.yml b/.github/workflows/e2e-test-manual.yml index 508d0a841..d15978466 100644 --- a/.github/workflows/e2e-test-manual.yml +++ b/.github/workflows/e2e-test-manual.yml @@ -55,6 +55,11 @@ on: type: string default: "default" required: false + git-ref: + description: "Git ref to checkout." + type: string + default: "head" + required: false env: ARM_CLIENT_ID: ${{ secrets.AZURE_E2E_CLIENT_ID }} @@ -84,10 +89,16 @@ jobs: exit 0 fi - - name: Checkout + - name: Checkout head + if: inputs.git-ref == 'head' uses: actions/checkout@755da8c3cf115ac066823e79a1e1788f8940201b # v3.2.0 with: ref: ${{ !github.event.pull_request.head.repo.fork && github.head_ref || '' }} + - name: Checkout ref + if: inputs.git-ref != 'head' + uses: actions/checkout@755da8c3cf115ac066823e79a1e1788f8940201b # v3.2.0 + with: + ref: ${{ inputs.git-ref }} - name: Find latest image id: find-latest-image @@ -104,10 +115,16 @@ jobs: contents: read needs: [find-latest-image] steps: - - name: Check out repository + - name: Checkout head + if: inputs.git-ref == 'head' uses: actions/checkout@755da8c3cf115ac066823e79a1e1788f8940201b # v3.2.0 with: ref: ${{ !github.event.pull_request.head.repo.fork && github.head_ref || '' }} + - name: Checkout ref + if: inputs.git-ref != 'head' + uses: actions/checkout@755da8c3cf115ac066823e79a1e1788f8940201b # v3.2.0 + with: + ref: ${{ inputs.git-ref }} - name: Setup Go environment uses: actions/setup-go@6edd4406fa81c3da01a34fa6f6343087c207a568 # v3.5.0