Skip to content

Commit

Permalink
chore: update
Browse files Browse the repository at this point in the history
  • Loading branch information
conradbez committed May 15, 2024
1 parent a2d457e commit 9b38594
Showing 1 changed file with 25 additions and 0 deletions.
25 changes: 25 additions & 0 deletions monpush.fish
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

0 comments on commit 9b38594

Please sign in to comment.