Skip to content

Commit d790b9b

Browse files
authored
Add error to action (#3335)
1 parent 67cf559 commit d790b9b

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

.github/actions/fetch-nightly-cli/action.yaml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,14 @@ runs:
3232
--json databaseId \
3333
--jq '.[0].databaseId'
3434
)
35+
36+
if [ -z "$run_id" ]; then
37+
# Using the ::error:: prefix lets GitHub handle it as a special string, and shows up as a red error in the logs.
38+
# https://docs.github.com/en/actions/reference/workflows-and-actions/workflow-commands#setting-an-error-message
39+
echo "::error::No successful workflow runs found for branch '$BRANCH'."
40+
exit 1
41+
fi
42+
3543
echo "run_id=$run_id" >> $GITHUB_OUTPUT
3644
env:
3745
GH_REPO: wasp-lang/wasp

0 commit comments

Comments
 (0)