Skip to content

Commit 0ff73c4

Browse files
author
LE SAULNIER Kevin
committed
fix: workflow
Signed-off-by: LE SAULNIER Kevin <[email protected]>
1 parent b3ab95c commit 0ff73c4

File tree

1 file changed

+9
-5
lines changed

1 file changed

+9
-5
lines changed

.github/workflows/prepare-release.yml

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -28,13 +28,17 @@ jobs:
2828

2929
- name: Validate inputs
3030
run: |
31-
if ! date -d "${{ github.event.inputs.target_date }}" "+%Y-%m-%dT%H:%M:%SZ" >/dev/null 2>&1; then
32-
echo "❌ Invalid date"
33-
exit 1
31+
if [ -n "${{ github.event.inputs.target_date }}" ]; then
32+
if ! date -d "${{ github.event.inputs.target_date }}" "+%Y-%m-%dT%H:%M:%SZ" >/dev/null 2>&1; then
33+
echo "❌ Invalid date"
34+
exit 1
35+
fi
36+
echo "✅ Valid date"
37+
else
38+
echo "ℹ️ No date provided, will fallback to last friday"
3439
fi
35-
echo "✅ Valid date"
3640
37-
if [[ "github.event.inputs.release-version" =~ ^[0-9]+\.[0-9]+$ ]]; then
41+
if [[ "${{ github.event.inputs.release-version }}" =~ ^[0-9]+\.[0-9]+$ ]]; then
3842
echo "✅ Valid version"
3943
else
4044
echo "❌ Invalid version"

0 commit comments

Comments
 (0)