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

44 lines
1.1 KiB
YAML

name: Build Node binaries for Linux
on:
workflow_dispatch:
jobs:
linux:
runs-on: ubuntu-20.04
strategy:
fail-fast: false
matrix:
target-node: [10, 12, 14, 16, 17]
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 }}
context: .
file: ./Dockerfile.linux
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 }}-linux-x64
path: root/pkg-fetch/dist/*