Skip to content

Commit 8f5c91d

Browse files
authored
Merge pull request #97 from atlanhq/m4380
MM-4380 fix: ensure DOCKERFILE installs the current version of argopm
2 parents e485a0a + 1ac10b0 commit 8f5c91d

File tree

2 files changed

+12
-1
lines changed

2 files changed

+12
-1
lines changed

.github/workflows/npm-publish.yml

+9
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,14 @@ jobs:
2727
- uses: actions/[email protected]
2828
with:
2929
fetch-depth: 0
30+
- name: Get published version
31+
id: get_version
32+
run: |
33+
ARGOPM_VERSION=$(npm show . version)
34+
echo "The published version is: $ARGOPM_VERSION"
35+
echo "::set-output name=argopm_version::$ARGOPM_VERSION"
36+
# sleep 5 sec to make sure we can install the latest published version from npm in Dockerfile
37+
sleep 5
3038
- name: 'Get Previous tag'
3139
id: previoustag
3240
uses: "WyriHaximus/github-action-get-previous-tag@master"
@@ -56,3 +64,4 @@ jobs:
5664
build-args: |
5765
ACCESS_TOKEN_USR=$GITHUB_ACTOR
5866
ACCESS_TOKEN_PWD=${{ secrets.ORG_PAT_GITHUB }}
67+
ARGOPM_VERSION=${{ steps.get_version.outputs.published_version }}

Dockerfile

+3-1
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,14 @@
11
FROM node:20-alpine
22

3+
ARG ARGOPM_VERSION
4+
35
RUN mkdir /app
46

57
WORKDIR /app
68

79
COPY . /app
810

9-
RUN npm install argopm -g
11+
RUN npm install argopm@${ARGOPM_VERSION} -g
1012

1113
RUN npm install
1214

0 commit comments

Comments
 (0)