@@ -2,7 +2,7 @@ name: Create OCWM Monthly
2
2
3
3
on :
4
4
schedule :
5
- - cron : " 0 9 * * 2 " # Runs at 9 :00 AM every Tuesday
5
+ - cron : " 0 23 * * 1 " # Runs at 11 :00 PM every Monday
6
6
7
7
repository_dispatch :
8
8
types : ocwm-creator
@@ -47,30 +47,28 @@ jobs:
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-tuesday
50
+ id : check-third-monday
51
51
run : |
52
52
day=$(date +%d)
53
53
dow=$(date +%u) # Day of the week (1 = Monday, ..., 7 = Sunday)
54
- # Get the first day of this month
55
- first_tuesday=$(cal | awk '/^..$/ {print $3}')
56
- if [ "$dow" -ne 2 ]; then
57
- echo "Not a Tuesday, exiting..."
58
- echo "::set-output name=is-third-tuesday::false"
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"
59
58
exit 0
60
59
fi
61
- # Calculate the third Tuesday by checking if the current date is between 15th and 21st
62
60
if [ "$day" -ge 15 ] && [ "$day" -le 21 ]; then
63
- echo "This is the third Tuesday of the month!"
64
- echo "::set-output name=is-third-tuesday ::true"
61
+ echo "This is the third Monday of the month!"
62
+ echo "::set-output name=is-third-monday ::true"
65
63
else
66
- echo "Not the third Tuesday , exiting..."
67
- echo "::set-output name=is-third-tuesday ::false"
64
+ echo "Not the third Monday , exiting..."
65
+ echo "::set-output name=is-third-monday ::false"
68
66
exit 0
69
67
fi
70
68
71
69
- name : Create Issue using Template
72
70
id : create-issue
73
- if : steps.check-third-tuesday.outputs.is-third-tuesday == 'true'
71
+ if : steps.check-third-tuesday.outputs.is-third-monday == 'true'
74
72
uses : peter-evans/create-issue-from-file@v5
75
73
with :
76
74
title : ${{ steps.create-title.outputs.title }}
0 commit comments