diff --git a/action.yml b/action.yml index 9c97f8a..ed320c0 100644 --- a/action.yml +++ b/action.yml @@ -14,12 +14,13 @@ runs: url="${GITHUB_API_URL}/repos" repo="${GITHUB_REPOSITORY}" run_id="${GITHUB_RUN_ID}" + token="${{ github.token }}" - failure=$(curl -s "${url}/${repo}/actions/runs/${run_id}/jobs" | \ + failure=$(curl -s -H "Authorization: token ${token}" "${url}/${repo}/actions/runs/${run_id}/jobs" | \ jq -r '.jobs[] | select(.status == "completed" and .conclusion == "failure").conclusion' | \ wc -l) - cancelled=$(curl -s "${url}/${repo}/actions/runs/${run_id}/jobs" | \ + cancelled=$(curl -s -H "Authorization: token ${token}" "${url}/${repo}/actions/runs/${run_id}/jobs" | \ jq -r '.jobs[] | select(.status == "completed" and .conclusion == "cancelled").conclusion' | \ wc -l) @@ -35,4 +36,4 @@ runs: shell: bash branding: icon: check-square - color: gray-dark \ No newline at end of file + color: gray-dark