diff --git a/.github/workflows/strain_dispatcher.yml b/.github/workflows/strain_dispatcher.yml index aa8081e8..5d1a4611 100644 --- a/.github/workflows/strain_dispatcher.yml +++ b/.github/workflows/strain_dispatcher.yml @@ -11,10 +11,10 @@ jobs: - name: checkout repo uses: actions/checkout@v3 with: - -ref: ${{ github.event.pull_request.head.sha}} + ref: ${{ github.sha }} - name: get last commit name run: | - LAST_COMMIT_LOG=$(git show -s --format=%s) + LAST_COMMIT_LOG=$(git log -1 --no-merges --pretty=format:"%s") echo "LAST_COMMIT_LOG=${LAST_COMMIT_LOG}" >> $GITHUB_ENV # update GitHub ENV vars - name: Log of last commit of the PR is run: echo "${{ env.LAST_COMMIT_LOG }}" @@ -29,7 +29,7 @@ jobs: { "repo": "${{ github.repository }}", "ref": "${{ github.ref }}", - "sha": "${{ github.event.pull_request.head.sha }}", + "sha": "${{ github.sha }}", "ref_name": "${{ github.ref_name }}", "head_ref": "${{ github.head_ref }}", "base_ref": "${{ github.base_ref }}",