-
-
Notifications
You must be signed in to change notification settings - Fork 0
39 lines (35 loc) · 1.03 KB
/
update.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
name: update packages
on:
schedule:
# * is a special character in YAML so you have to quote this string
- cron: '0 0 * * MON' # At 00:00, only on Monday
push:
paths:
- 'tools/Build/.config/dotnet-tools.json'
jobs:
update-packages:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
if: github.event_name == 'push'
- name: Checkout main
uses: actions/checkout@v4
if: github.event_name == 'schedule'
with:
ref: main
- name: Setup .NET
uses: actions/setup-dotnet@v4
with:
dotnet-version: 6.x.x
- name: Update packages
if: github.event_name == 'push'
run: dotnet run -- update-packages --parallel
working-directory: tools/Build
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Update packages and create PR
if: github.event_name == 'schedule'
run: dotnet run -- create-update-pr --parallel
working-directory: tools/Build
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}