Skip to content

Commit ee709b2

Browse files
Updating github-config (#894)
1 parent 0eb4798 commit ee709b2

File tree

1 file changed

+7
-5
lines changed

1 file changed

+7
-5
lines changed

.github/workflows/release-reminder.yml

+7-5
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ on:
77

88
jobs:
99
determine-date:
10-
name: Release buildpacks on 2nd and 4th Thursday of the month
10+
name: Release buildpacks on 2nd and last Thursdays of the month
1111
runs-on: ubuntu-22.04
1212
outputs:
1313
should_run: ${{ steps.should_run.outputs.bool }}
@@ -20,14 +20,16 @@ jobs:
2020
echo "bool=true" >> "${GITHUB_OUTPUT}"
2121
else
2222
day_of_month=$(date +%d)
23-
# Check if it's the second or fourth Thursday of the month
23+
last_day_cutoff=$(expr $(date -d "-$(date +%d) days month" +%d) - 6)
24+
# Check if it's the second or last Thursday of the month
2425
# second thursday of the month will always be between day 8 and 14 (inclusive)
2526
if [[ "$day_of_month" -ge "8" && "$day_of_month" -le "14" ]]; then
2627
echo "It's the second Thursday of the month"
2728
echo "bool=true" >> "${GITHUB_OUTPUT}"
28-
# fourth thursday of the month will always be between day 21 and 28 (inclusive)
29-
elif [[ "$day_of_month" -ge "22" && "$day_of_month" -le "28" ]]; then
30-
echo "It's the fourth Thursday of the month"
29+
# last thursday of the month will always be within 6 days of the last day of the month
30+
# $last_day_cutoff=(# days in this month - 6)
31+
elif [[ "$day_of_month" -ge "$last_day_cutoff" ]]; then
32+
echo "It's the last Thursday of the month"
3133
echo "bool=true" >> "${GITHUB_OUTPUT}"
3234
else
3335
echo "It's another Thursday of the month"

0 commit comments

Comments
 (0)