Skip to content

Commit 27963e4

Browse files
authored
fix: correct job schedule cron expr (#28)
1 parent e6c390d commit 27963e4

File tree

1 file changed

+9
-3
lines changed

1 file changed

+9
-3
lines changed

.github/workflows/dst-server.yml

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ permissions:
55

66
on:
77
schedule:
8-
- cron: '0 */1 * * *' # run every hour
8+
- cron: '0 * * * *' # run every hour
99
workflow_dispatch: # allow to run manually
1010

1111
env:
@@ -45,8 +45,14 @@ jobs:
4545
sort -rn | \
4646
head -n 1)
4747
48-
if [[ -z "$CUR_VERSION" ]] || ! [[ "$CUR_VERSION" =~ ^[0-9]+$ ]]; then
49-
echo "Error: failed to fetch latest image version: $CUR_VERSION"
48+
if [[ -z "$CUR_VERSION" ]]; then
49+
echo "No valid version found, proceeding with build"
50+
echo "should_build=true" >> $GITHUB_OUTPUT
51+
exit 0
52+
fi
53+
54+
if ! [[ "$CUR_VERSION" =~ ^[0-9]+$ ]]; then
55+
echo "Error: Invalid version number: $CUR_VERSION"
5056
exit 1
5157
fi
5258

0 commit comments

Comments
 (0)