Skip to content

Commit b773a18

Browse files
committed
[.github] search completed runs
1 parent 257d79c commit b773a18

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

.github/workflows/workspace-integration-tests.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -89,10 +89,10 @@ jobs:
8989
echo "version=${{ inputs.version }}"
9090
} >> $GITHUB_OUTPUT
9191
else
92-
# Search the last 10 builds regardless of status (success and failed)
93-
RUNID=$(gh run list --repo gitpod-io/gitpod --branch main --workflow build.yml --limit 10 --json createdAt,conclusion,databaseId --jq 'map(select(.conclusion == "success")) | sort_by(.createdAt) | .[-1] | .databaseId')
92+
# Search the last 10 completed builds (any conclusion except null/in-progress)
93+
RUNID=$(gh run list --repo gitpod-io/gitpod --branch main --workflow build.yml --limit 10 --json createdAt,conclusion,databaseId --jq 'map(select(.conclusion != null)) | sort_by(.createdAt) | .[-1] | .databaseId')
9494
if [ "$RUNID" == "" ]; then
95-
echo no successful build found on main branch in the last 10 commits, see https://github.com/gitpod-io/gitpod/actions/workflows/build.yml for details | tee -a $GITHUB_STEP_SUMMARY
95+
echo no completed build found on main branch in the last 10 commits, see https://github.com/gitpod-io/gitpod/actions/workflows/build.yml for details | tee -a $GITHUB_STEP_SUMMARY
9696
# if we got here, it means in the last 10 builds on main, there wasn't a success, and then we'll keep getting this message
9797
# to fix, manually trigger the tests with the latest main-gha asset till we get a success
9898
# you might have to fix or disable flakey tests to do this

0 commit comments

Comments
 (0)