Skip to content

Instantly share code, notes, and snippets.

@noelbundick
Created October 14, 2021 19:46
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save noelbundick/b03053cf2fbc41dfb3d786d137d97712 to your computer and use it in GitHub Desktop.
Save noelbundick/b03053cf2fbc41dfb3d786d137d97712 to your computer and use it in GitHub Desktop.
Watch GitHub Actions run for a specific commit
# Get a commit hash from <gestures vaguely around> somewhere
REPO="noelbundick/myrepo"
SHA=$(git rev-parse HEAD)
# Get the run associated w/ the commit
RUN=$(gh api "repos/${REPO}/actions/runs" --jq "[.workflow_runs[] | select(.head_sha == \"$SHA\")][0].id")
# Watch it
gh run watch -R $REPO $RUN
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment