Skip to content

Commit c386987

Browse files
arichardsonchrehrhardt
authored andcommitted
ci: allow running locally with gh act
When running with `gh act`, node needs to be installed in all runner environments and since this is not the case for the Morello docker image we install it here manually (but only when running with `act`). Signed-off-by: Alex Richardson <[email protected]>
1 parent 9d1979b commit c386987

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

.github/workflows/build.yml

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,16 @@ jobs:
4848
container: docker.io/ctsrd/morello-sdk:latest
4949

5050
steps:
51+
# Install node.js in the docker container to allow testing this action with `gh act` locally.
52+
# This is not needed in real GitHub action runs, so limit this to env.ACT being set.
53+
- name: Install node.js
54+
if: ${{ env.ACT && matrix.compiler == 'llvm-morello' }}
55+
run: |
56+
sudo apt-get update && sudo apt-get install -y curl
57+
curl -fsSL https://deb.nodesource.com/setup_24.x | sudo bash -
58+
sudo apt-get update && sudo apt-get install -y nodejs
59+
node --version
60+
5161
- name: Checkout code
5262
uses: actions/checkout@v6
5363

0 commit comments

Comments
 (0)