Skip to content

Commit 57230bf

Browse files
authored
override nodejs to unbreak antique builds (viamrobotics#4589)
1 parent 8f51b88 commit 57230bf

File tree

1 file changed

+19
-3
lines changed

1 file changed

+19
-3
lines changed

.github/workflows/staticbuild.yml

+19-3
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,11 @@ on:
55
inputs:
66
release_type:
77
required: true
8+
default: latest
89
type: string
10+
no-upload:
11+
type: boolean
12+
description: "no-upload: if checked, don't upload"
913
workflow_call:
1014
inputs:
1115
release_type:
@@ -44,13 +48,24 @@ jobs:
4448
container:
4549
image: ${{ matrix.image }}
4650
options: --platform ${{ matrix.platform }}
51+
volumes:
52+
# otherwise we get a 'read-only filesystem' error when symlinking over this
53+
- /tmp/node20:/__e/node20
4754
timeout-minutes: 15
4855
outputs:
4956
date: ${{ steps.build_date.outputs.date }}
5057
env:
5158
ACTIONS_ALLOW_USE_UNSECURE_NODE_VERSION: 'true'
5259

5360
steps:
61+
- name: override nodejs
62+
# note: the antique image intentionally has an old ubuntu with old GLIBC; github's node requires a newer one.
63+
# actions require this /__e/node20/bin/node file, so we override it.
64+
run: |
65+
mkdir -p /__e/node20/bin/
66+
ln --force --symbolic $(which node) /__e/node20/bin/node
67+
/__e/node20/bin/node --version
68+
5469
- name: Check out code
5570
if: github.event_name == 'workflow_dispatch' || github.event_name == 'push'
5671
uses: actions/checkout@v3
@@ -102,7 +117,7 @@ jobs:
102117
run: echo "date=`date +%F`" >> $GITHUB_OUTPUT
103118

104119
- name: Upload Files (Testing)
105-
if: github.event_name == 'workflow_dispatch' || github.event_name == 'push'
120+
if: ${{ (github.event_name == 'workflow_dispatch' || github.event_name == 'push') && !inputs.no-upload }}
106121
uses: google-github-actions/[email protected]
107122
with:
108123
headers: "cache-control: no-cache"
@@ -113,7 +128,7 @@ jobs:
113128
gzip: false
114129

115130
- name: Upload Manifest (Testing)
116-
if: github.event_name == 'workflow_dispatch' || github.event_name == 'push'
131+
if: ${{ (github.event_name == 'workflow_dispatch' || github.event_name == 'push') && !inputs.no-upload }}
117132
uses: google-github-actions/[email protected]
118133
with:
119134
headers: "cache-control: no-cache"
@@ -139,7 +154,7 @@ jobs:
139154
140155
static_test:
141156
name: Static Test
142-
if: github.event_name == 'workflow_dispatch' || github.event_name == 'push'
157+
if: ${{ (github.event_name == 'workflow_dispatch' || github.event_name == 'push') && !inputs.no-upload }}
143158
strategy:
144159
fail-fast: false
145160
matrix:
@@ -186,6 +201,7 @@ jobs:
186201
static_deploy:
187202
name: Static Deploy
188203
needs: static_test
204+
if: ${{ !inputs.no-upload }}
189205
runs-on: ubuntu-latest
190206

191207
steps:

0 commit comments

Comments
 (0)