Skip to content

Commit 6658d35

Browse files
authored
Fix node 20 issue on GHA CI
1 parent ca85c19 commit 6658d35

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
@@ -164,24 +164,28 @@ jobs:
164164
os: macos-14
165165

166166
runs-on: ${{matrix.os}}
167-
container: ${{matrix.container}}
167+
container:
168+
image: ${{matrix.container}}
169+
volumes:
170+
- /node20217:/node20217:rw,rshared
171+
- ${{ startsWith(matrix.container, 'ubuntu:1') && '/node20217:/__e/node20:ro,rshared' || ' ' }}
168172

169173
defaults:
170174
run:
171175
shell: bash
172176

173177
steps:
174-
- name: Enable Node 16
175-
run: |
176-
echo "ACTIONS_ALLOW_USE_UNSECURE_NODE_VERSION=true" >> $GITHUB_ENV
177-
178-
- uses: actions/checkout@v3
179-
180178
- name: Setup container environment
181179
if: matrix.container
182180
run: |
183181
apt-get update
184-
apt-get -y install sudo python3 git g++
182+
apt-get -y install sudo python3 git g++ curl
183+
if [[ "${{matrix.container}}" == "ubuntu:1"* ]]; then
184+
# Node 20 doesn't work with Ubuntu 16/18 glibc: https://github.com/actions/checkout/issues/1590
185+
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
186+
fi
187+
188+
- uses: actions/checkout@v4
185189

186190
- name: Install packages
187191
if: matrix.install

0 commit comments

Comments
 (0)