diff --git a/.github/workflows/windows-qe-tpl.yml b/.github/workflows/windows-qe-tpl.yml index 1cd1e70169..b71f4c4ae4 100644 --- a/.github/workflows/windows-qe-tpl.yml +++ b/.github/workflows/windows-qe-tpl.yml @@ -50,15 +50,15 @@ jobs: workflow: ${{inputs.trigger-workflow-id}} name: crc-${{inputs.qe-type}}-windows-amd64 - - name: Correlate + - name: Correlatea env: PULL_SECRET: ${{ secrets.PULL_SECRET }} run: | - # Get origin commit sha for testing + # Get origin commit sha for testinga commit_sha=$(cat gh_context.json | jq -r '.event.after') - if [[ -z "${commit_sha}" ]]; then + if [[ -z "${commit_sha}" ]] || [[ "${commit_sha}" == null ]]; then # on first PR creation .event.after is empty, then .sha is used as commit instead - commit_sha=$(cat gh_context.json | jq -r '.sha') + commit_sha=$(cat gh_context.json | jq -r '.event.pull_request.head.sha') fi echo "commit_sha=${commit_sha}" >> "$GITHUB_ENV"