diff --git a/github_list_workflows.sh b/github_list_workflows.sh index 22865af8..2372d210 100755 --- a/github_list_workflows.sh +++ b/github_list_workflows.sh @@ -42,4 +42,9 @@ if [ -n "${PASSWORD:-}" ]; then echo "using authenticated access" >&2 fi -eval "$srcdir/curl_auth.sh" -sS --connect-timeout 3 "${CURL_OPTS:-}" "https://api.github.com/repos/$repo/actions/workflows" +workflow_id="${2:-}" +if [ -n "$workflow_id" ]; then + workflow_id="/$workflow_id" +fi + +eval "$srcdir/curl_auth.sh" -sS --connect-timeout 3 "${CURL_OPTS:-}" "https://api.github.com/repos/$repo/actions/workflows$workflow_id"