Created
October 14, 2021 19:46
-
-
Save noelbundick/b03053cf2fbc41dfb3d786d137d97712 to your computer and use it in GitHub Desktop.
Watch GitHub Actions run for a specific commit
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# 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