@@ -2,7 +2,7 @@ name: Create OCWM Monthly
2
2
3
3
on :
4
4
schedule :
5
- - cron : " 0 23 * * 1 " # Runs at 11:00 PM every Monday
5
+ - cron : " 0 23 * * 2 " # Runs at 11:00 PM every Tuesday
6
6
7
7
repository_dispatch :
8
8
types : ocwm-creator
@@ -36,39 +36,39 @@ jobs:
36
36
# Get the first day of the next month
37
37
next_month=$(date -u -d "$(date +%Y-%m-01) +1 month" +%Y-%m-01)
38
38
39
- # Find the first Monday of the next month
40
- first_monday =$(date -u -d "$next_month +$(( (8 - $(date -u -d "$next_month" +%u)) % 7 )) days" +%Y-%m-%d)
39
+ # Find the first Tuesday of the next month
40
+ first_tuesday =$(date -u -d "$next_month +$(( (9 - $(date -u -d "$next_month" +%u)) % 7 )) days" +%Y-%m-%d)
41
41
42
- # Calculate the third Monday by adding 14 days to the first Monday
43
- third_monday =$(date -u -d "$first_monday +14 days" +%Y-%m-%d)
42
+ # Calculate the third Tuesday by adding 14 days to the first Tuesday
43
+ third_tuesday =$(date -u -d "$first_tuesday +14 days" +%Y-%m-%d)
44
44
45
- # Output the issue title with the third Monday 's date
46
- echo "title=Open Community Working Meeting ${third_monday } - 12:00 PT" >> "$GITHUB_OUTPUT"
45
+ # Output the issue title with the third Tuesday 's date
46
+ echo "title=Open Community Working Meeting ${third_tuesday } - 12:00 PT" >> "$GITHUB_OUTPUT"
47
47
48
48
# Step to check if it's the third Tuesday of the month
49
49
- name : Check if today is the third Tuesday
50
- id : check-third-monday
50
+ id : check-third-tuesday
51
51
run : |
52
52
day=$(date +%d)
53
53
dow=$(date +%u) # Day of the week (1 = Monday, ..., 7 = Sunday)
54
- # Check if the day is between 15th and 21st, and if it's Monday (1 )
55
- if [ "$dow" -ne 1 ]; then
56
- echo "Not a Monday , exiting..."
57
- echo "::set-output name=is-third-monday ::false"
54
+ # Check if the day is between 15th and 21st, and if it's Tuesday (2 )
55
+ if [ "$dow" -ne 2 ]; then
56
+ echo "Not a Tuesday , exiting..."
57
+ echo "::set-output name=is-third-tuesday ::false"
58
58
exit 0
59
59
fi
60
60
if [ "$day" -ge 15 ] && [ "$day" -le 21 ]; then
61
- echo "This is the third Monday of the month!"
62
- echo "::set-output name=is-third-monday ::true"
61
+ echo "This is the third Tuesday of the month!"
62
+ echo "::set-output name=is-third-tuesday ::true"
63
63
else
64
- echo "Not the third Monday , exiting..."
65
- echo "::set-output name=is-third-monday ::false"
64
+ echo "Not the third Tuesday , exiting..."
65
+ echo "::set-output name=is-third-tuesday ::false"
66
66
exit 0
67
67
fi
68
68
69
69
- name : Create Issue using Template
70
70
id : create-issue
71
- if : steps.check-third-tuesday.outputs.is-third-monday == 'true'
71
+ if : steps.check-third-tuesday.outputs.is-third-tuesday == 'true'
72
72
uses : peter-evans/create-issue-from-file@v5
73
73
with :
74
74
title : ${{ steps.create-title.outputs.title }}
0 commit comments