diff --git a/action.yml b/action.yml index 6c541ee..2aab1e7 100644 --- a/action.yml +++ b/action.yml @@ -28,10 +28,11 @@ runs: workflow_id=$(curl --header 'authorization: Bearer ${{ inputs.github_token }}' \ --header 'content-type: application/json' \ https://api.github.com/repos/${{ github.repository }}/actions/runs/${{ github.run_id }} | jq -r .workflow_id) + echo "workflow id: $workflow_id" last_status=$(curl --silent --header 'authorization: Bearer ${{ inputs.github_token }}' \ --header 'content-type: application/json' \ "https://api.github.com/repos/${{ github.repository }}/actions/workflows/$workflow_id/runs?per_page=1&status=completed&branch=${{ inputs.branch }}" | jq -r .workflow_runs[0].conclusion) - + echo "status of the previous build: $last_status" needs_context="${{ inputs.needs_context }}" if [[ $(echo $needs_context | grep "result: failure") ]]; then