Skip to content

Commit c7ebb38

Browse files
authored
Fix week number calculation in workflow
1 parent ac8de6b commit c7ebb38

File tree

1 file changed

+4
-6
lines changed

1 file changed

+4
-6
lines changed

.github/workflows/auto-weekly-issue.yml

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -16,14 +16,12 @@ jobs:
1616
- name: Calculate week number and dates
1717
id: calc
1818
run: |
19-
# 현재 날짜 기준 주차 계산 (1월 1일 기준)
20-
WEEK_NUM=$(date +%-U)
21-
# 주차를 2자리로 포맷 (01, 02, ...)
22-
WEEK_NUM_FORMATTED=$(printf "%02d" $((WEEK_NUM + 1)))
19+
WEEK_NUM=$(date +%U)
20+
21+
WEEK_NUM_FORMATTED=$(printf "%02d" $((10#$WEEK_NUM + 1)))
2322
24-
# 이번 주 월요일과 일요일 계산
2523
START_DATE=$(date -d "monday" +%Y.%m.%d)
26-
END_DATE=$(date -d "sunday" +%Y.%m.%d)
24+
END_DATE=$(date -d "monday + 6 days" +%Y.%m.%d)
2725
2826
echo "week_number=$WEEK_NUM_FORMATTED" >> $GITHUB_OUTPUT
2927
echo "start_date=$START_DATE" >> $GITHUB_OUTPUT

0 commit comments

Comments
 (0)