Skip to content

Commit a99988d

Browse files
committed
add input
1 parent 7ca69f3 commit a99988d

File tree

1 file changed

+13
-2
lines changed

1 file changed

+13
-2
lines changed

.github/workflows/sycl-update-gpu-driver.yml

Lines changed: 13 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,11 @@ on:
55
- cron: '0 3 * * 2'
66
- cron: '0 3 * * 1,4'
77
workflow_dispatch:
8+
inputs:
9+
day_of_week:
10+
description: 'Override the day of the week (e.g., 1 for Monday, 2 for Tuesday, etc.)'
11+
required: false
12+
default: '2'
813

914
permissions: read-all
1015

@@ -17,9 +22,15 @@ jobs:
1722
steps:
1823
- uses: actions/checkout@v4
1924
- name: Determine parameters based on the day of the week
20-
id: params
2125
run: |
22-
DAY_OF_WEEK=$(date +%u)
26+
if [ "${{ github.event_name }}" = "workflow_dispatch" ]; then
27+
# Use the input day_of_week when manually triggered
28+
DAY_OF_WEEK="${{ inputs.day_of_week }}"
29+
else
30+
# Use the current day of the week when triggered by a schedule
31+
DAY_OF_WEEK=$(date +%u)
32+
fi
33+
2334
if [ "$DAY_OF_WEEK" = "2" ]; then
2435
PARAM=""
2536
else

0 commit comments

Comments
 (0)