Skip to content

Commit 3ce6ef3

Browse files
committed
[ci] Bugfix file-update.yml
1 parent ef01f6a commit 3ce6ef3

File tree

1 file changed

+11
-6
lines changed

1 file changed

+11
-6
lines changed

CI/file-update.yml

Lines changed: 11 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -14,10 +14,6 @@ env:
1414
DOTNET_SKIP_FIRST_TIME_EXPERIENCE: true
1515
DOTNET_CLI_TELEMETRY_OPTOUT: true
1616

17-
permissions:
18-
contents: write
19-
pull-requests: write
20-
2117
jobs:
2218
Update:
2319
runs-on: ubuntu-latest
@@ -27,14 +23,22 @@ jobs:
2723
with:
2824
show-progress: false
2925
fetch-depth: 1
26+
- name: Install
27+
# Change dir to avoid problems with global.json in repo root.
28+
working-directory: ${{ runner.temp }}
29+
run: |
30+
$ErrorActionPreference = 'Stop'
31+
$PSNativeCommandUseErrorActionPreference = $true
32+
dotnet tool update -g dotnet-file
3033
- name: Update
3134
# Both must be set because dotnet-file internally calls gh cli to fetch the changelog.
3235
env:
3336
GCM_CREDENTIAL_STORE: cache
3437
GH_TOKEN: ${{ github.token }}
3538
id: update
3639
run: |
37-
dotnet tool update -g dotnet-file
40+
$ErrorActionPreference = 'Stop'
41+
$PSNativeCommandUseErrorActionPreference = $true
3842
3943
[string]$tmpfile = New-TemporaryFile
4044
dotnet-file update "-c:$tmpfile"
@@ -52,6 +56,7 @@ jobs:
5256
- name: Pull Request
5357
uses: peter-evans/create-pull-request@v6
5458
with:
59+
token: ${{ secrets.DOTNET_FILESYNC_PAT }}
5560
base: master
5661
branch: dotnet-file-sync
5762
delete-branch: true
@@ -61,4 +66,4 @@ jobs:
6166
commit-message: |
6267
Update Single File Dependencies
6368
64-
${{ steps.sync.outputs.Changelog }}
69+
${{ steps.update.outputs.Changelog }}

0 commit comments

Comments
 (0)