pkg-fetch/.github/workflows/arm64-linuxstatic.yml
2022-01-10 17:51:50 -08:00

56 lines
1.5 KiB
YAML

name: Build Node binaries for Linux static (arm64)
on:
workflow_dispatch:
jobs:
linuxstatic:
runs-on: linux-arm64
strategy:
fail-fast: false
matrix:
target-node: [10, 12, 14, 16, 17]
target-arch: [arm64]
include:
- target-arch: arm64
docker-platform: linux/arm64
- target-node: 16
target-arch: armv7
docker-platform: linux/arm/v7
- target-node: 17
target-arch: armv7
docker-platform: linux/arm/v7
steps:
- uses: actions/checkout@v2
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v1
- name: Build
uses: docker/build-push-action@v2
with:
build-args: |
PKG_FETCH_OPTION_n=node${{ matrix.target-node }}
PKG_FETCH_OPTION_p=linuxstatic
context: .
file: ./Dockerfile.alpine
platforms: ${{ matrix.docker-platform }}
outputs: type=tar,dest=../out.tar
- name: Extract binaries from Docker image
run: |
tar xvf ../out.tar root/pkg-fetch/dist
- name: Check if binary is compiled
id: check_file
run: |
(test -f root/pkg-fetch/dist/*.sha256sum && echo ::set-output name=EXISTS::true) || echo ::set-output name=EXISTS::false
- uses: actions/upload-artifact@v2
if: steps.check_file.outputs.EXISTS == 'true'
with:
name: node${{ matrix.target-node }}-linuxstatic-${{ matrix.target-arch }}
path: root/pkg-fetch/dist/*