Skip to content

ci: remove QEMU setup from build workflows #578

ci: remove QEMU setup from build workflows

ci: remove QEMU setup from build workflows #578

Workflow file for this run

name: Docker Image Testing
on:
pull_request:
paths:
- "Dockerfile"
- "build.sh"
- ".github/workflows/dockerimage.yml"
env:
IMAGE_NAME: node-minimal
permissions:
contents: read
jobs:
build:
strategy:
matrix:
os:
- ubuntu-24.04
- ubuntu-24.04-arm
platform:
- amd64
- arm64
exclude:
- os: ubuntu-24.04
platform: arm64
- os: ubuntu-24.04-arm
platform: amd64
runs-on: ${{ matrix.os }}
steps:
- name: Checkout
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
with:
persist-credentials: false
- name: ccache
uses: hendrikmuhs/ccache-action@d62db5f07c26379fc4b4e0916f098a92573c3b03 # v1.2.23
with:
key: ${{ matrix.os }}-${{ matrix.platform }}
max-size: 10G
- name: Configure ccache
run: |
ccache --set-config=sloppiness=time_macros,locale,include_file_ctime,include_file_mtime
ccache --set-config=hash_dir=false
ccache -p
- name: Get latest node version
run: echo "LATEST_VERSION=$(curl -fsSLo- --compressed https://nodejs.org/dist/index.json | jq '.[].version' | tr -d '"' | tr -d 'v' | head -1)" >> $GITHUB_ENV
- name: Display Node Version
run: |
echo "Building Node.js version: $LATEST_VERSION"
- name: Build Node
run: |
export PATH="/usr/lib/ccache:/usr/local/opt/ccache/libexec:$PATH"
which gcc
./build.sh -n $LATEST_VERSION
ccache -s
cp node-v$LATEST_VERSION/out/Release/node node
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@d7f5e7f509e45cec5c76c4d5afdd7de93d0b3df5 # v4.1.0
- name: Build Image
uses: docker/build-push-action@f9f3042f7e2789586610d6e8b85c8f03e5195baf # v7.2.0
with:
context: .
platforms: linux/${{ matrix.platform }}
load: true
tags: ${{ env.IMAGE_NAME }}-${{ env.LATEST_VERSION }}
- name: Test Image
run: docker run --rm "${IMAGE_NAME}-${LATEST_VERSION}" -e "console.log('Hello from Node.js ' + process.version)"