mirror of
https://github.com/SonarSource/sonarqube-scan-action.git
synced 2026-10-07 20:10:46 +00:00
uses winget instead of Chocolatey
This commit is contained in:
1 parent
280d6fc5b8
commit
e0c4e7abeb
1 file changed
+9
-3
@@ -25,11 +25,17 @@ jobs:
|
|||||||
- name: Checkout
|
- name: Checkout
|
||||||
uses: actions/checkout@v4
|
uses: actions/checkout@v4
|
||||||
|
|
||||||
- name: Install native GnuPG (Gpg4win) and put it first on PATH
|
- name: Install native GnuPG (winget GnuPG.GnuPG) and put it first on PATH
|
||||||
shell: powershell
|
shell: powershell
|
||||||
run: |
|
run: |
|
||||||
choco config set commandExecutionTimeout 600
|
# Install native GnuPG via winget. The choco 'gnupg' package hangs at
|
||||||
choco install gnupg -y --no-progress --install-arguments "/S" --retries 3 --retry-delay 5
|
# "Installing gnupg..." (its installer blocks in the non-interactive runner
|
||||||
|
# session), so we use winget's GnuPG.GnuPG package instead.
|
||||||
|
winget install --id GnuPG.GnuPG --exact --silent `
|
||||||
|
--accept-source-agreements --accept-package-agreements --disable-interactivity
|
||||||
|
# winget exits non-zero for benign cases (e.g. already installed); don't fail
|
||||||
|
# here on that. The gpg.exe presence check below is the real gate.
|
||||||
|
Write-Host "winget exit code: $LASTEXITCODE"
|
||||||
# The reporter's gpg lives at C:\Program Files (x86)\GnuPG\bin\gpg.exe.
|
# The reporter's gpg lives at C:\Program Files (x86)\GnuPG\bin\gpg.exe.
|
||||||
# Prepend the native GnuPG dir to PATH so `gpg` resolves to it (and NOT to
|
# Prepend the native GnuPG dir to PATH so `gpg` resolves to it (and NOT to
|
||||||
# the Git-for-Windows build, which would mask the bug by accepting /r/... paths).
|
# the Git-for-Windows build, which would mask the bug by accepting /r/... paths).
|
||||||
|
|||||||
Reference in new issue
Block a user