File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 11name : Build Alpine Node.js
22permissions :
33 contents : write
4-
54
65on :
76 workflow_dispatch :
87 inputs :
98 NodeVersion :
109 required : true
11- description : ' Node.js version to build (ex: v12.4.0)'
12- PythonVersion :
13- required : true
14- description : ' Node.js v12 needs python2 and Node.js v16 needs python3'
10+ description : ' Node.js version to build (ex: v12.22.7, v16.12.0)'
1511
1612jobs :
1713 build :
2117 - uses : actions/checkout@v2
2218 - name : Build the Docker image
2319 run : |
24- 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}} .
20+ NodeVersion="${{github.event.inputs.NodeVersion}}"
21+ PythonVersion="python3"
22+ if [[ $NodeVersion = v12* ]]
23+ then
24+ PythonVersion="python2"
25+ fi
26+ echo node.js version $NodeVersion
27+ echo python version $PythonVersion
28+ docker build --file Dockerfile --tag alpine_nodejs:${{github.event.inputs.NodeVersion}} --build-arg NodeVersion=${{github.event.inputs.NodeVersion}} --build-arg PythonVersion=$PythonVersion .
2529 - name : Copy alpine node.js out
2630 run : |
2731 mkdir $RUNNER_TEMP/alpine_node
You can’t perform that action at this time.
0 commit comments