Create docker-image.yml

This commit is contained in:
Tingluo Huang
2021-10-21 14:10:26 -04:00
committed by GitHub
parent bc5f1f2d00
commit dfee355089

29
.github/workflows/docker-image.yml vendored Normal file
View File

@@ -0,0 +1,29 @@
name: Build Alpine Node.js
on:
workflow_dispatch:
inputs:
NodeVersion:
required: true
description: 'Node.js version to build (ex: v12.4.0)'
jobs:
build:
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}} .
- 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
path: ${{runner.temp}}/alpine_node