Skip to content

Commit 1f1c820

Browse files
committed
[ci][skip-ci] Improve VS update workflows
1 parent 82162e3 commit 1f1c820

2 files changed

Lines changed: 34 additions & 6 deletions

File tree

.github/workflows/visual-studio-latest.yml

Lines changed: 17 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -19,20 +19,34 @@ on:
1919

2020
jobs:
2121
update-visualstudio-latest:
22+
if: ${{ github.event.schedule == '0 1 * * 3' || (github.event_name == 'workflow_dispatch' && inputs.selected-job == 'Update') }}
23+
24+
name: Update Visual Studio - Latest
25+
2226
runs-on:
2327
- self-hosted
2428
- windows
2529
- x64
2630
- latest
2731

2832
steps:
29-
- name: Update Visual Studio - Latest
30-
if: ${{ github.event.schedule == '0 1 * * 3' || (github.event_name == 'workflow_dispatch' && inputs.selected-job == 'Update') }}
33+
- name: Update Visual Studio
3134
shell: cmd
3235
run: "C:\\bin\\vs_update.bat"
3336

37+
reboot-after-update:
38+
if: ${{ github.event.schedule == '30 1 * * 3' || (github.event_name == 'workflow_dispatch' && inputs.selected-job == 'Reboot') }}
39+
40+
name: Reboot after update
41+
42+
runs-on:
43+
- self-hosted
44+
- windows
45+
- x64
46+
- latest
47+
48+
steps:
3449
- name: Reboot
35-
if: ${{ github.event.schedule == '30 1 * * 3' || (github.event_name == 'workflow_dispatch' && inputs.selected-job == 'Reboot') }}
3650
shell: cmd
3751
run: "shutdown /r"
3852

.github/workflows/visual-studio-preview.yml

Lines changed: 17 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -19,20 +19,34 @@ on:
1919

2020
jobs:
2121
update-visualstudio-preview:
22+
if: ${{ github.event.schedule == '0 1 * * 3' || (github.event_name == 'workflow_dispatch' && inputs.selected-job == 'Update') }}
23+
24+
name: Update Visual Studio - Preview (Insiders)
25+
2226
runs-on:
2327
- self-hosted
2428
- windows
2529
- x64
2630
- preview
2731

2832
steps:
29-
- name: Update Visual Studio - Preview (Insiders)
30-
if: ${{ github.event.schedule == '0 1 * * 3' || (github.event_name == 'workflow_dispatch' && inputs.selected-job == 'Update') }}
33+
- name: Update Visual Studio
3134
shell: cmd
3235
run: "C:\\bin\\vs_update.bat"
3336

37+
reboot-after-update:
38+
if: ${{ github.event.schedule == '30 1 * * 3' || (github.event_name == 'workflow_dispatch' && inputs.selected-job == 'Reboot') }}
39+
40+
name: Reboot after update
41+
42+
runs-on:
43+
- self-hosted
44+
- windows
45+
- x64
46+
- latest
47+
48+
steps:
3449
- name: Reboot
35-
if: ${{ github.event.schedule == '30 1 * * 3' || (github.event_name == 'workflow_dispatch' && inputs.selected-job == 'Reboot') }}
3650
shell: cmd
3751
run: "shutdown /r"
3852

0 commit comments

Comments
 (0)