11
11
DOTNET_NOLOGO : true
12
12
13
13
jobs :
14
- sync :
15
- runs-on : windows-latest
16
- continue-on-error : true
17
- steps :
18
- - name : 🤖 defaults
19
- uses : devlooped/actions-bot@v1
20
- with :
21
- name : ${{ secrets.BOT_NAME }}
22
- email : ${{ secrets.BOT_EMAIL }}
23
- gh_token : ${{ secrets.GH_TOKEN }}
24
- github_token : ${{ secrets.GITHUB_TOKEN }}
25
-
26
- - name : 🤘 checkout
27
- uses : actions/checkout@v4
28
- with :
29
- fetch-depth : 0
30
- ref : main
31
- token : ${{ env.GH_TOKEN }}
32
-
33
- - name : ⌛ rate
34
- shell : pwsh
35
- if : github.event_name != 'workflow_dispatch'
36
- run : |
37
- # add random sleep since we run on fixed schedule
38
- sleep (get-random -max 60)
39
- # get currently authenticated user rate limit info
40
- $rate = gh api rate_limit | convertfrom-json | select -expandproperty rate
41
- # if we don't have at least 100 requests left, wait until reset
42
- if ($rate.remaining -lt 10) {
43
- $wait = ($rate.reset - (Get-Date (Get-Date).ToUniversalTime() -UFormat %s))
44
- echo "Rate limit remaining is $($rate.remaining), waiting for $($wait / 1000) seconds to reset"
45
- sleep $wait
46
- $rate = gh api rate_limit | convertfrom-json | select -expandproperty rate
47
- echo "Rate limit has reset to $($rate.remaining) requests"
48
- }
49
-
50
- - name : 🔄 sync
51
- shell : pwsh
52
- run : |
53
- dotnet tool update -g dotnet-gcm
54
- dotnet gcm store --protocol=https --host=github.com --username=$env:GITHUB_ACTOR --password=$env:GH_TOKEN
55
- gh auth status
56
-
57
- dotnet tool update -g dotnet-file
58
- dotnet file sync -c:$env:TEMP\dotnet-file.md
59
- if (test-path $env:TEMP\dotnet-file.md) {
60
- echo 'CHANGES<<EOF' >> $env:GITHUB_ENV
61
- cat $env:TEMP\dotnet-file.md >> $env:GITHUB_ENV
62
- echo 'EOF' >> $env:GITHUB_ENV
63
- cat $env:TEMP\dotnet-file.md
64
- } else {
65
- echo 'No changelog was generated'
66
- }
67
-
68
- - name : +Mᐁ includes
69
- uses : devlooped/actions-include@v1
70
- with :
71
- validate : false
72
-
73
- - name : ✍ pull request
74
- uses : peter-evans/create-pull-request@v6
75
- with :
76
- base : main
77
- branch : dotnet-file-sync
78
- delete-branch : true
79
- labels : dependencies
80
- author : ${{ env.BOT_AUTHOR }}
81
- committer : ${{ env.BOT_AUTHOR }}
82
- commit-message : ⬆️ Bump files with dotnet-file sync
83
-
84
- ${{ env.CHANGES }}
85
- title : " ⬆️ Bump files with dotnet-file sync"
86
- body : ${{ env.CHANGES }}
87
- token : ${{ env.GH_TOKEN }}
14
+ run :
15
+ uses : devlooped/oss/.github/workflows/dotnet-file-core.yml@main
16
+ secrets : inherit
0 commit comments