@@ -15,53 +15,87 @@ jobs:
1515 run : |
1616 echo ::set-output name=number::$(node -p -e "new Date().getDay()")
1717 shell : bash
18+ - name : Hour of day
19+ id : hour
20+ run : |
21+ echo ::set-output name=hour::$(node -p -e "(new Date().getUTCHours() - 7)%24")
22+ shell : bash
1823 - name : Week Number
1924 id : week
2025 run : |
21- echo ::set-output name=number ::$(node .github/workflows/week.js)
26+ echo ::set-output name=odd ::$(node .github/workflows/week.js)
2227 shell : bash
2328 - name : Print day and week
2429 run : |
2530 echo ${{steps.day.outputs.number}}
26- echo ${{steps.week.outputs.number}}
31+ echo ${{steps.week.outputs.odd}}
32+ echo ${{steps.hour.outputs.hour}}
2733 shell : bash
28- - name : Assign to @David (sat, sun, mon - odd week)
29- if : steps.day.outputs.number == 6 || steps.day.outputs.number == 0 || steps.day.outputs.number == 1
34+ - name : Even late friday (David)
35+ if : steps.week.outputs.odd == 0 && steps.day.outputs.number == 5 && steps.hour.outputs.hour >= 16
36+ uses : actions/github@v1.0.0
37+ env :
38+ GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
39+ with :
40+ args : assign DonJayamanne
41+ - name : Odd late friday (Joyce)
42+ if : steps.week.outputs.odd == 1 && steps.day.outputs.number == 5 && steps.hour.outputs.hour >= 16
43+ uses : actions/github@v1.0.0
44+ env :
45+ GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
46+ with :
47+ args : assign DonJayamanne
48+ - name : Odd weekends (David)
49+ if : steps.week.outputs.odd == 1 && (steps.day.outputs.number == 6 || steps.day.outputs.number == 0)
50+ uses : actions/github@v1.0.0
51+ env :
52+ GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
53+ with :
54+ args : assign DonJayamanne
55+ - name : Even weekends (Joyce)
56+ if : steps.week.outputs.odd == 0 && (steps.day.outputs.number == 6 || steps.day.outputs.number == 0)
57+ uses : actions/github@v1.0.0
58+ env :
59+ GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
60+ with :
61+ args : assign DonJayamanne
62+ - name : Odd Monday (David)
63+ if : steps.week.outputs.odd == 1 && steps.day.outputs.number == 1 && steps.hour.outputs.hour < 16
3064 uses : actions/github@v1.0.0
3165 env :
3266 GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
3367 with :
3468 args : assign DonJayamanne
35- - name : Assign to @Joyce (sat, sun, mon - even week )
36- if : steps.day .outputs.number == 6 || steps.day.outputs.number == 0 || steps.day .outputs.number == 1
69+ - name : Even Monday (Joyce )
70+ if : steps.week .outputs.odd == 0 && steps.day.outputs.number == 1 && steps.hour .outputs.hour < 16
3771 uses : actions/github@v1.0.0
3872 env :
3973 GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
4074 with :
4175 args : assign DonJayamanne
42- - name : Assign to @Rich (tues )
43- if : steps.day.outputs.number == 2
76+ - name : Tuesday (Rich )
77+ if : ( steps.day.outputs.number == 1 && steps.hour.outputs.hour >= 16) || (steps.day.outputs.number == 2 && steps.hour.outputs.hour < 16)
4478 uses : actions/github@v1.0.0
4579 env :
4680 GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
4781 with :
4882 args : assign DonJayamanne
49- - name : Assign to @Ian (wed )
50- if : steps.day.outputs.number == 3
83+ - name : Wednesday (Ian )
84+ if : ( steps.day.outputs.number == 2 && steps.hour.outputs.hour >= 16) || (steps.day.outputs.number == 3 && steps.hour.outputs.hour < 16)
5185 uses : actions/github@v1.0.0
5286 env :
5387 GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
5488 with :
5589 args : assign DonJayamanne
56- - name : Assign to @DonJayamanne
57- if : steps.day.outputs.number == 4
90+ - name : Thursday (Don)
91+ if : ( steps.day.outputs.number == 3 && steps.hour.outputs.hour >= 16) || (steps.day.outputs.number == 4 && steps.hour.outputs.hour < 16)
5892 uses : actions/github@v1.0.0
5993 env :
6094 GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
6195 with :
6296 args : assign DonJayamanne
63- - name : Assign to @Claudia (fri )
64- if : steps.day.outputs.number == 5
97+ - name : Friday (Claudia )
98+ if : ( steps.day.outputs.number == 4 && steps.hour.outputs.hour >= 16) || (steps.day.outputs.number == 5 && steps.hour.outputs.hour < 16)
6599 uses : actions/github@v1.0.0
66100 env :
67101 GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
0 commit comments