Skip to content

Commit 880fca8

Browse files
committed
Add fallback to gpg
1 parent c77f154 commit 880fca8

File tree

4 files changed

+26
-17
lines changed

4 files changed

+26
-17
lines changed

.github/workflows/build-test-windows.yml

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -20,8 +20,8 @@ jobs:
2020
timeout-minutes: 60
2121
strategy:
2222
fail-fast: false
23-
matrix:
24-
version: [ 22.7.0 ]
23+
matrix:
24+
version: [ "22.8.0" ]
2525
variant: [ "windows-2019" ]
2626

2727
steps:
@@ -43,23 +43,23 @@ jobs:
4343
- name: Test for node version
4444
shell: pwsh
4545
run: |
46-
$image_node_version = (docker run --rm node:${{ matrix.version }}-${{ matrix.variant }} node --print "process.versions.node").Trim()
46+
$image_node_version = (docker run --rm node:${{ matrix.version }}-${{ matrix.variant }} node --print "process.versions.node").Trim()
4747
Write-Host "Expected: '${{ matrix.version }}', Got: '$image_node_version'"
4848
if ($image_node_version -ne "${{ matrix.version }}") {
49-
exit 1
49+
exit 1
5050
}
51-
51+
5252
- name: Verify entrypoint runs regular, non-executable files with node
5353
shell: pwsh
5454
run: |
55-
$tempDir = New-Item -ItemType Directory -Path $env:TEMP -Name "tempNodeApp"
55+
$tempDir = New-Item -ItemType Directory -Path $env:TEMP -Name "tempNodeApp"
5656
$tmp_file = Join-Path $tempDir "index.js"
5757
"console.log('success')" | Out-File -FilePath $tmp_file -Encoding utf8
5858
$output = (docker run --rm -w /app --mount "type=bind,src=$tempDir,target=c:\app" node:${{ matrix.version }}-${{ matrix.variant }} C:/app/index.js)
5959
if ($output -ne 'success') {
6060
Write-Host "Invalid"
6161
}
62-
62+
6363
- name: Test for npm
6464
run: docker run --rm node:${{ matrix.version }}-${{ matrix.variant }} npm --version
6565

@@ -69,8 +69,8 @@ jobs:
6969
timeout-minutes: 60
7070
strategy:
7171
fail-fast: false
72-
matrix:
73-
version: [ "22.7.0" ]
72+
matrix:
73+
version: [ "22.8.0" ]
7474
variant: [ "windows-2022" ]
7575

7676
steps:
@@ -92,22 +92,22 @@ jobs:
9292
- name: Test for node version
9393
shell: pwsh
9494
run: |
95-
$image_node_version = (docker run --rm node:${{ matrix.version }}-${{ matrix.variant }} node --print "process.versions.node").Trim()
95+
$image_node_version = (docker run --rm node:${{ matrix.version }}-${{ matrix.variant }} node --print "process.versions.node").Trim()
9696
Write-Host "Expected: '${{ matrix.version }}', Got: '$image_node_version'"
9797
if ($image_node_version -ne "${{ matrix.version }}") {
9898
exit 1
9999
}
100-
100+
101101
- name: Verify entrypoint runs regular, non-executable files with node
102102
shell: pwsh
103103
run: |
104-
$tempDir = New-Item -ItemType Directory -Path $env:TEMP -Name "tempNodeApp"
104+
$tempDir = New-Item -ItemType Directory -Path $env:TEMP -Name "tempNodeApp"
105105
$tmp_file = Join-Path $tempDir "index.js"
106106
"console.log('success')" | Out-File -FilePath $tmp_file -Encoding utf8
107107
$output = (docker run --rm -w /app --mount "type=bind,src=$tempDir,target=c:\app" node:${{ matrix.version }}-${{ matrix.variant }} C:/app/index.js)
108108
if ($output -ne 'success') {
109109
Write-Host "Invalid"
110110
}
111-
111+
112112
- name: Test for npm
113-
run: docker run --rm node:${{ matrix.version }}-${{ matrix.variant }} npm --version
113+
run: docker run --rm node:${{ matrix.version }}-${{ matrix.variant }} npm --version

22/windows-2019/Dockerfile

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,10 @@ RUN @( \
3434
'A363A499291CBBC940DD62E41F10027AF002F8B0', \
3535
'CC68F5A3106FF448322E48ED27F5E38D5B0A215F' \
3636
) | foreach { \
37-
gpg --keyserver hkps://keys.openpgp.org --recv-keys $_ ; \
37+
gpg --batch --keyserver hkps://keys.openpgp.org --recv-keys $_ ; \
38+
if (-not $?) { \
39+
gpg --batch --keyserver keyserver.ubuntu.com --recv-keys $_ ; \
40+
} \
3841
} ; \
3942
[Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12 ; \
4043
Invoke-WebRequest $('https://nodejs.org/dist/v{0}/SHASUMS256.txt.asc' -f $env:NODE_VERSION) -OutFile 'SHASUMS256.txt.asc' -UseBasicParsing ; \

22/windows-2022/Dockerfile

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,10 @@ RUN @( \
3434
'A363A499291CBBC940DD62E41F10027AF002F8B0', \
3535
'CC68F5A3106FF448322E48ED27F5E38D5B0A215F' \
3636
) | foreach { \
37-
gpg --keyserver hkps://keys.openpgp.org --recv-keys $_ ; \
37+
gpg --batch --keyserver hkps://keys.openpgp.org --recv-keys $_ ; \
38+
if (-not $?) { \
39+
gpg --batch --keyserver keyserver.ubuntu.com --recv-keys $_ ; \
40+
} \
3841
} ; \
3942
[Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12 ; \
4043
Invoke-WebRequest $('https://nodejs.org/dist/v{0}/SHASUMS256.txt.asc' -f $env:NODE_VERSION) -OutFile 'SHASUMS256.txt.asc' -UseBasicParsing ; \

Dockerfile-windows.template

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,10 @@ RUN Invoke-WebRequest $('https://www.gnupg.org/ftp/gcrypt/binary/gnupg-w32-{0}.e
2323
RUN @( \
2424
"${NODE_KEYS[@]}"
2525
) | foreach { \
26-
gpg --keyserver hkps://keys.openpgp.org --recv-keys $_ ; \
26+
gpg --batch --keyserver hkps://keys.openpgp.org --recv-keys $_ ; \
27+
if (-not $?) { \
28+
gpg --batch --keyserver keyserver.ubuntu.com --recv-keys $_ ; \
29+
} \
2730
} ; \
2831
[Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12 ; \
2932
Invoke-WebRequest $('https://nodejs.org/dist/v{0}/SHASUMS256.txt.asc' -f $env:NODE_VERSION) -OutFile 'SHASUMS256.txt.asc' -UseBasicParsing ; \

0 commit comments

Comments
 (0)