Compare commits
3 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
b85caf7640 | ||
|
|
e9e2d354c2 | ||
|
|
d5a1710f1f |
16
.github/workflows/docker-image.yml
vendored
16
.github/workflows/docker-image.yml
vendored
@@ -1,17 +1,13 @@
|
||||
name: Build Alpine Node.js
|
||||
permissions:
|
||||
contents: write
|
||||
|
||||
|
||||
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'
|
||||
description: 'Node.js version to build (ex: v12.22.7, v16.12.0)'
|
||||
|
||||
jobs:
|
||||
build:
|
||||
@@ -21,7 +17,15 @@ jobs:
|
||||
- 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}} .
|
||||
NodeVersion="${{github.event.inputs.NodeVersion}}"
|
||||
PythonVersion="python3"
|
||||
if [[ $NodeVersion = v12* ]]
|
||||
then
|
||||
PythonVersion="python2"
|
||||
fi
|
||||
echo node.js version $NodeVersion
|
||||
echo python version $PythonVersion
|
||||
docker build --file Dockerfile --tag alpine_nodejs:${{github.event.inputs.NodeVersion}} --build-arg NodeVersion=${{github.event.inputs.NodeVersion}} --build-arg PythonVersion=$PythonVersion .
|
||||
- name: Copy alpine node.js out
|
||||
run: |
|
||||
mkdir $RUNNER_TEMP/alpine_node
|
||||
|
||||
23
README.md
23
README.md
@@ -1 +1,22 @@
|
||||
# alpine_nodejs
|
||||
# alpine_nodejs
|
||||
|
||||
[GitHub Actions Runner](https://github.com/actions/runner/blob/main/src/Misc/externals.sh) download alpine node.js from https://vstsagenttools.blob.core.windows.net/tools/nodejs
|
||||
|
||||
The [workflow](https://github.com/TingluoHuang/alpine_nodejs/actions/workflows/docker-image.yml) in this repository can compile a partial-static node.js for alpine and create a [GitHub release](https://github.com/TingluoHuang/alpine_nodejs/releases) for it.
|
||||
|
||||
- Queue workflow using `workflow_dispatch` trigger and set the `node` version you want to compile as input, ex: `v12.22.7`
|
||||

|
||||
|
||||
- Wait for the run to complete
|
||||

|
||||
|
||||
- There should be a newly created release that matches the version you want for `node`, and it is able to run on alpine.
|
||||

|
||||
|
||||
- Once we get [approval](https://github.com/github/open-source-releases/issues/205) to change the current repository from `private` to `public`, then we can consume the release assets directly. In the meantime, you will need to follow [instructions](https://dev.azure.com/mseng/AzureDevOps/_wiki/wikis/AzureDevOps.wiki/4037/How-to-upload-resource-to-vstsagenttools.blob.core.windows.net) to check-in the compiled alpine node.js from the release assets as a `Git-LFS` files to https://dev.azure.com/mseng/AzureDevOps/_git/CIPlat.Externals and get it mirror into https://vstsagenttools.blob.core.windows.net/tools/nodejs
|
||||
> Tips for working with `CIPlat.Externals` repository:
|
||||
> - The repository is huge right now, you don't want to waste your time and disk space to get those unrelated files.
|
||||
> - Ignore LFS files during initial `git clone` the repo with `GIT_LFS_SKIP_SMUDGE=1 git clone https://mseng@dev.azure.com/mseng/AzureDevOps/_git/CIPlat.Externals`
|
||||
> - Ignore LFS files during any `git checkout` or `git fetch` operation with `GIT_LFS_SKIP_SMUDGE=1`.
|
||||
> - You do want the LFS smudge filter to run during `git add` and `git push`, make sure you don't have `GIT_LFS_SKIP_SMUDGE=1` when you run `git add` and `git push`.
|
||||
> - More `Git-LFS` doc is at https://github.com/git-lfs/git-lfs/tree/main/docs
|
||||
|
||||
BIN
res/createdRelease.png
Normal file
BIN
res/createdRelease.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 305 KiB |
BIN
res/queueWorkflow.png
Normal file
BIN
res/queueWorkflow.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 406 KiB |
BIN
res/succeedRun.png
Normal file
BIN
res/succeedRun.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 296 KiB |
Reference in New Issue
Block a user