Files
alpine_nodejs/.github/workflows/docker-image.yml
2021-10-21 23:38:22 -04:00

31 lines
1.1 KiB
YAML

name: Build Alpine Node.js
on:
workflow_dispatch:
inputs:
NodeVersion:
required: true
description: 'Node.js version to build (ex: v12.4.0)'
PythonVersion:
required: true
description: 'Node.js v12 needs python2 and Node.js v16 needs python3'
jobs:
build:
name: Build node.js ${{github.event.inputs.NodeVersion}}
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Build the Docker image
run: |
docker build --file Dockerfile --tag alpine_nodejs:${{github.event.inputs.NodeVersion}} --build-arg NodeVersion=${{github.event.inputs.NodeVersion}} --build-arg PythonVersion=${{github.event.inputs.PythonVersion}} .
- name: Copy alpine node.js out
run: |
mkdir $RUNNER_TEMP/alpine_node
docker run --rm -v $RUNNER_TEMP/alpine_node:/node_output alpine_nodejs:${{github.event.inputs.NodeVersion}}
- name: Upload alpine node.js
uses: actions/upload-artifact@v2
with:
name: alpine_nodejs_${{github.event.inputs.NodeVersion}}
path: ${{runner.temp}}/alpine_node