-
Notifications
You must be signed in to change notification settings - Fork 13
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
1 changed file
with
25 additions
and
0 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
#!/usr/bin/env fish | ||
|
||
# Function to monitor GitHub Actions run after push | ||
function monitor-run | ||
# Wait for a few seconds to ensure the GitHub Actions workflow starts | ||
sleep 5 | ||
|
||
# Get the latest run ID | ||
set LATEST_RUN_ID (gh run list --limit 1 --json databaseId -q '.[0].databaseId') | ||
open "https://github.com/conradbez/hstream/actions/runs/$LATEST_RUN_ID" | ||
# Watch the latest run logs | ||
gh run watch $LATEST_RUN_ID | ||
|
||
# Get the status of the latest run | ||
set RUN_STATUS (gh run view $LATEST_RUN_ID --json conclusion -q '.conclusion') | ||
|
||
# Print the status | ||
echo "The latest run concluded with status: $RUN_STATUS" | ||
echo "https://github.com/conradbez/hstream/actions/runs/$LATEST_RUN_ID" | ||
end | ||
|
||
git push | ||
|
||
# Call the function to monitor the run | ||
monitor-run |