Skip to content

Commit 9d2c4d2

Browse files
committed
fix: Auto-sync winget-pkgs fork before submitting manifest
1 parent 1f8fb99 commit 9d2c4d2

1 file changed

Lines changed: 13 additions & 0 deletions

File tree

.github/workflows/winget.yml

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -108,6 +108,19 @@ jobs:
108108
run: |
109109
Invoke-WebRequest -Uri https://aka.ms/wingetcreate/latest -OutFile wingetcreate.exe
110110
111+
- name: Sync winget-pkgs fork
112+
shell: pwsh
113+
env:
114+
WINGET_PAT: ${{ secrets.WINGET_PAT }}
115+
run: |
116+
$headers = @{
117+
Authorization = "Bearer $env:WINGET_PAT"
118+
Accept = "application/vnd.github+json"
119+
}
120+
$body = '{"branch":"master"}'
121+
Invoke-RestMethod -Uri "https://api.github.com/repos/tolgamorf/winget-pkgs/merge-upstream" -Method Post -Headers $headers -Body $body -ContentType "application/json"
122+
Write-Host "Fork synced with upstream"
123+
111124
- name: Submit Winget manifest
112125
shell: pwsh
113126
env:

0 commit comments

Comments
 (0)