Skip to content

Commit

Permalink
Updating github-config
Browse files Browse the repository at this point in the history
  • Loading branch information
cf-buildpacks-eng committed May 16, 2024
1 parent f9d2a59 commit 4803db4
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions .github/workflows/release-reminder.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ jobs:
- name: Should run
id: should_run
run: |
set -eu
if [[ ${{ github.event_name }} == 'workflow_dispatch' ]]; then
echo "Skipping date check, because workflow was run manually"
echo "bool=true" >> "${GITHUB_OUTPUT}"
Expand All @@ -23,12 +24,12 @@ jobs:
last_day_cutoff=$(expr $(date -d "-$(date +%d) days month" +%d) - 6)
# Check if it's the second or last Thursday of the month
# second thursday of the month will always be between day 8 and 14 (inclusive)
if [[ "$day_of_month" -ge "8" && "$day_of_month" -le "14" ]]; then
if [ "$day_of_month" -ge "8" && "$day_of_month" -le "14" ]; then
echo "It's the second Thursday of the month"
echo "bool=true" >> "${GITHUB_OUTPUT}"
# last thursday of the month will always be within 6 days of the last day of the month
# $last_day_cutoff=(# days in this month - 6)
elif [[ "$day_of_month" -ge "$last_day_cutoff" ]]; then
elif [ "$day_of_month" -ge "$last_day_cutoff" ]; then
echo "It's the last Thursday of the month"
echo "bool=true" >> "${GITHUB_OUTPUT}"
else
Expand Down

0 comments on commit 4803db4

Please sign in to comment.