Skip to content

Commit

Permalink
override nodejs to unbreak antique builds (#4589)
Browse files Browse the repository at this point in the history
  • Loading branch information
abe-winter authored Nov 26, 2024
1 parent 8f51b88 commit 57230bf
Showing 1 changed file with 19 additions and 3 deletions.
22 changes: 19 additions & 3 deletions .github/workflows/staticbuild.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,11 @@ on:
inputs:
release_type:
required: true
default: latest
type: string
no-upload:
type: boolean
description: "no-upload: if checked, don't upload"
workflow_call:
inputs:
release_type:
Expand Down Expand Up @@ -44,13 +48,24 @@ jobs:
container:
image: ${{ matrix.image }}
options: --platform ${{ matrix.platform }}
volumes:
# otherwise we get a 'read-only filesystem' error when symlinking over this
- /tmp/node20:/__e/node20
timeout-minutes: 15
outputs:
date: ${{ steps.build_date.outputs.date }}
env:
ACTIONS_ALLOW_USE_UNSECURE_NODE_VERSION: 'true'

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

- name: Upload Files (Testing)
if: github.event_name == 'workflow_dispatch' || github.event_name == 'push'
if: ${{ (github.event_name == 'workflow_dispatch' || github.event_name == 'push') && !inputs.no-upload }}
uses: google-github-actions/upload-cloud-storage@v0.10.4
with:
headers: "cache-control: no-cache"
Expand All @@ -113,7 +128,7 @@ jobs:
gzip: false

- name: Upload Manifest (Testing)
if: github.event_name == 'workflow_dispatch' || github.event_name == 'push'
if: ${{ (github.event_name == 'workflow_dispatch' || github.event_name == 'push') && !inputs.no-upload }}
uses: google-github-actions/upload-cloud-storage@v0.10.4
with:
headers: "cache-control: no-cache"
Expand All @@ -139,7 +154,7 @@ jobs:
static_test:
name: Static Test
if: github.event_name == 'workflow_dispatch' || github.event_name == 'push'
if: ${{ (github.event_name == 'workflow_dispatch' || github.event_name == 'push') && !inputs.no-upload }}
strategy:
fail-fast: false
matrix:
Expand Down Expand Up @@ -186,6 +201,7 @@ jobs:
static_deploy:
name: Static Deploy
needs: static_test
if: ${{ !inputs.no-upload }}
runs-on: ubuntu-latest

steps:
Expand Down

0 comments on commit 57230bf

Please sign in to comment.