Skip to content

Commit b6b5fd1

Browse files
author
Matus Kasak
committed
Use directly output from gh workflow run
1 parent ac1a04c commit b6b5fd1

1 file changed

Lines changed: 3 additions & 25 deletions

File tree

.github/workflows/deploy.yml

Lines changed: 3 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -218,22 +218,8 @@ jobs:
218218
-f CUSTOMER="${{ github.ref_name }}" \
219219
-f URL="http://dev-5.pc:88/repository/server/api" 2>&1)
220220
221-
echo "$OUTPUT"
222-
223221
RUN_ID=$(echo "$OUTPUT" | grep -oE '/runs/[0-9]+' | grep -oE '[0-9]+')
224222
225-
echo "Run ID: $RUN_ID"
226-
227-
sleep 15
228-
229-
# RUN_ID=$(gh run list \
230-
# --repo "$REPO" \
231-
# --workflow "$WORKFLOW" \
232-
# --event workflow_dispatch \
233-
# --limit 1 \
234-
# --json databaseId \
235-
# --jq '.[0].databaseId')
236-
237223
echo "Watching run: https://github.com/$REPO/actions/runs/$RUN_ID"
238224
gh run watch "$RUN_ID" --repo "$REPO" --interval 30 --exit-status
239225
@@ -255,21 +241,13 @@ jobs:
255241
steps:
256242
- name: run rest-tests
257243
run: |
258-
gh workflow run "$WORKFLOW" \
244+
OUTPUT=$(gh workflow run "$WORKFLOW" \
259245
--repo "$REPO" \
260246
--ref master \
261247
-f CUSTOMER="${{ github.ref_name }}" \
262-
-f URL="http://dev-5.pc:88/repository/server/api"
263-
264-
sleep 15
248+
-f URL="http://dev-5.pc:88/repository/server/api" 2>&1)
265249
266-
RUN_ID=$(gh run list \
267-
--repo "$REPO" \
268-
--workflow "$WORKFLOW" \
269-
--event workflow_dispatch \
270-
--limit 1 \
271-
--json databaseId \
272-
--jq '.[0].databaseId')
250+
RUN_ID=$(echo "$OUTPUT" | grep -oE '/runs/[0-9]+' | grep -oE '[0-9]+')
273251
274252
echo "Watching run: https://github.com/$REPO/actions/runs/$RUN_ID"
275253
gh run watch "$RUN_ID" --repo "$REPO" --interval 30 --exit-status

0 commit comments

Comments
 (0)