Skip to content

Commit

Permalink
Add some information for debugging
Browse files Browse the repository at this point in the history
  • Loading branch information
jadolg committed Jan 21, 2021
1 parent cf5aca0 commit d4010db
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit d4010db

Please sign in to comment.