Skip to content

Commit ebbf050

Browse files
authored
Fix node 20 issue on GHA CI
1 parent 316f4ce commit ebbf050

File tree

1 file changed

+12
-8
lines changed

1 file changed

+12
-8
lines changed

.github/workflows/ci.yml

Lines changed: 12 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -175,24 +175,28 @@ jobs:
175175
os: macos-15
176176

177177
runs-on: ${{matrix.os}}
178-
container: ${{matrix.container}}
178+
container:
179+
image: ${{matrix.container}}
180+
volumes:
181+
- /node20217:/node20217:rw,rshared
182+
- ${{ startsWith(matrix.container, 'ubuntu:1') && '/node20217:/__e/node20:ro,rshared' || ' ' }}
179183

180184
defaults:
181185
run:
182186
shell: bash
183187

184188
steps:
185-
- name: Enable Node 16
186-
run: |
187-
echo "ACTIONS_ALLOW_USE_UNSECURE_NODE_VERSION=true" >> $GITHUB_ENV
188-
189-
- uses: actions/checkout@v3
190-
191189
- name: Setup container environment
192190
if: matrix.container
193191
run: |
194192
apt-get update
195-
apt-get -y install sudo python3 git g++
193+
apt-get -y install sudo python3 git g++ curl
194+
if [[ "${{matrix.container}}" == "ubuntu:1"* ]]; then
195+
# Node 20 doesn't work with Ubuntu 16/18 glibc: https://github.com/actions/checkout/issues/1590
196+
curl -sL https://unofficial-builds.nodejs.org/download/release/v20.9.0/node-v20.9.0-linux-x64-glibc-217.tar.xz | tar -xJ --strip-components 1 -C /node20217
197+
fi
198+
199+
- uses: actions/checkout@v4
196200

197201
- name: Install packages
198202
if: matrix.install

0 commit comments

Comments
 (0)