Skip to content

Commit

Permalink
loop until complete
Browse files Browse the repository at this point in the history
  • Loading branch information
ezynda3 committed May 16, 2024
1 parent 0038d69 commit 12ed522
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions .k8s/staging/deployment.yml
Original file line number Diff line number Diff line change
Expand Up @@ -74,8 +74,12 @@ spec:
gh auth login
export JOB_ID=$(uuidgen)
echo "{\"job_id\": \"$JOB_ID\" }" | gh workflow run build-and-deploy-staging --repo mark3labs/louper-v3 --ref dev --json
STATUS=$(gh run list --workflow=build-and-deploy-staging --repo mark3labs/louper-v3 --json "status,name" | jq '.[] | select(.name == "build-and-deploy-staging:$JOB_ID")' | jq '.status')
echo $STATUS
STATUS="starting"
while [[ "$STATUS" != "completed" && "$STATUS" != "failure" ]]
do
STATUS=$(gh run list --workflow=build-and-deploy-staging --repo mark3labs/louper-v3 --json "status,name" | jq '.[] | select(.name == "build-and-deploy-staging:$JOB_ID")' | jq '.status')
sleep 1
done
resources:
limits:
Expand Down

0 comments on commit 12ed522

Please # to comment.