File tree Expand file tree Collapse file tree 3 files changed +9
-3
lines changed
Expand file tree Collapse file tree 3 files changed +9
-3
lines changed Original file line number Diff line number Diff line change 3232 with :
3333 images : ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}
3434
35+ - name : Get target Node version from .nvmrc
36+ id : node-version
37+ # https://stackoverflow.com/a/62059571
38+ run : echo "version=$(cat .nvmrc | tr -cd '[:digit:].')" >> $GITHUB_OUTPUT
39+
3540 - name : Build and push Docker image
3641 uses : docker/build-push-action@v4
3742 with :
4045 tags : ${{ steps.meta.outputs.tags }}
4146 labels : ${{ steps.meta.outputs.labels }}
4247 build-args : |
48+ NODE_VERSION=${{ steps.node-version.outputs.version }}
4349 GIT_COMMIT_HASH=${{ github.sha }}
4450 GIT_REPO_URI=${{ github.repostitoryUrl }}
Original file line number Diff line number Diff line change 1- 16
1+ 22
Original file line number Diff line number Diff line change 1- # https://nodejs.org/en/docs/guides/nodejs-docker-webapp
2- FROM node:16 -alpine
1+ ARG NODE_VERSION
2+ FROM node:${NODE_VERSION:-lts} -alpine
33WORKDIR /usr/src/app
44
55# copy package.json/package-lock.json and install dependencies
You can’t perform that action at this time.
0 commit comments