Skip to content

Commit a5152ff

Browse files
committed
stable: do not fail if there is nothing to run
Signed-off-by: Marc 'risson' Schmitt <[email protected]>
1 parent a1f56b9 commit a5152ff

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

.github/workflows/stable.yml

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,15 +33,21 @@ jobs:
3333
echo "$tag"
3434
fi
3535
done | jq -R -s -c 'split("\n") | map(select(length > 0))')"
36-
echo "tags=${tags}" >> "$GITHUB_OUTPUT"
36+
37+
should_run="$([ "$(echo "$tags" | jq '.|length')" -eq 0 ] && echo false || echo true)"
38+
39+
echo "tags=$tags" >> "$GITHUB_OUTPUT"
40+
echo "should_run=$should_run" >> "$GITHUB_OUTPUT"
3741
env:
3842
GH_TOKEN: "${{ steps.app-token.outputs.token }}"
3943
outputs:
4044
tags: "${{ steps.tags.outputs.tags }}"
45+
should_run: "${{ steps.tags.outputs.should_run }}"
4146
release:
4247
runs-on: ubuntu-latest
4348
needs:
4449
- tags
50+
if: "${{ needs.tags.outputs.should_run == 'true' }}"
4551
strategy:
4652
fail-fast: false
4753
max-parallel: 1

0 commit comments

Comments
 (0)