mirror of
https://github.com/bentoml/OpenLLM.git
synced 2026-03-06 08:08:03 -05:00
chore: simplify actions
Signed-off-by: Aaron <29749331+aarnphm@users.noreply.github.com>
This commit is contained in:
@@ -73,51 +73,3 @@ while true; do
|
||||
done
|
||||
|
||||
sleep 10
|
||||
|
||||
WORKFLOW_ID=$(gh run list -w binary-distribution --repo bentoml/openllm -L 1 --json databaseId | jq '.[]| .databaseId')
|
||||
|
||||
echo "Waiting for binary distribution to complete..."
|
||||
git pull --rebase
|
||||
while true; do
|
||||
STATUS=$(gh run view "$WORKFLOW_ID" --json status --jq '.status')
|
||||
if [[ "${STATUS}" == "completed" ]]; then
|
||||
break
|
||||
fi
|
||||
sleep 10
|
||||
done
|
||||
|
||||
# Set the maximum timeout (in seconds)
|
||||
timeout=36000
|
||||
|
||||
sleep 10
|
||||
|
||||
echo "Generating release notes (release-notes.yml)..."
|
||||
git pull --rebase
|
||||
gh workflow run release-notes.yml --repo bentoml/openllm --ref "v$(hatch version)"
|
||||
|
||||
sleep 10
|
||||
|
||||
echo "Getting 'release-notes.yml' workflow id..."
|
||||
WORKFLOW_ID=$(gh run list -w release-notes --repo bentoml/openllm -L 1 --json databaseId | jq '.[]| .databaseId')
|
||||
start_time=$(date +%s)
|
||||
while true; do
|
||||
STATUS=$(gh run view "$WORKFLOW_ID" --json status --jq '.status')
|
||||
if [[ $STATUS == "completed" ]]; then
|
||||
break
|
||||
fi
|
||||
current_time=$(date +%s)
|
||||
elapsed_time=$((current_time - start_time))
|
||||
if [[ $elapsed_time -gt $timeout ]]; then
|
||||
echo "Timeout reached. Cancelling the check."
|
||||
break
|
||||
fi
|
||||
sleep 10
|
||||
done
|
||||
|
||||
# Run the second workflow (b.yml) if the first workflow completed
|
||||
if [[ $STATUS != "completed" ]]; then
|
||||
echo "Failed to generate release notes. Check the logs at GitHub Actions."
|
||||
exit 1
|
||||
else
|
||||
exit 0
|
||||
fi
|
||||
|
||||
Reference in New Issue
Block a user