From 5390e08eb81bb206b0fb5c605fb7a566b61f141d Mon Sep 17 00:00:00 2001 From: Tianchu Zhao Date: Mon, 23 Dec 2024 15:12:06 +0530 Subject: [PATCH 1/3] fix: install current version instead of prev --- Dockerfile | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/Dockerfile b/Dockerfile index af0a964..85c1a0f 100644 --- a/Dockerfile +++ b/Dockerfile @@ -6,8 +6,6 @@ WORKDIR /app COPY . /app -RUN npm install argopm -g - -RUN npm install +RUN npm install && npm install . -g ENTRYPOINT ["argopm"] \ No newline at end of file From 4a9aa74144cc2c076e4092a68fd4a9a362a3d743 Mon Sep 17 00:00:00 2001 From: Tianchu Zhao Date: Mon, 23 Dec 2024 15:12:16 +0530 Subject: [PATCH 2/3] Release 0.10.21 From 1ac10b00a53d22f861c104460eac406bbe86bbeb Mon Sep 17 00:00:00 2001 From: Tianchu Zhao Date: Mon, 23 Dec 2024 15:42:05 +0530 Subject: [PATCH 3/3] fix: ensure install correct version --- .github/workflows/npm-publish.yml | 9 +++++++++ Dockerfile | 6 +++++- 2 files changed, 14 insertions(+), 1 deletion(-) diff --git a/.github/workflows/npm-publish.yml b/.github/workflows/npm-publish.yml index a61092a..0522312 100644 --- a/.github/workflows/npm-publish.yml +++ b/.github/workflows/npm-publish.yml @@ -27,6 +27,14 @@ jobs: - uses: actions/checkout@v2.2.0 with: fetch-depth: 0 + - name: Get published version + id: get_version + run: | + ARGOPM_VERSION=$(npm show . version) + echo "The published version is: $ARGOPM_VERSION" + echo "::set-output name=argopm_version::$ARGOPM_VERSION" + # sleep 5 sec to make sure we can install the latest published version from npm in Dockerfile + sleep 5 - name: 'Get Previous tag' id: previoustag uses: "WyriHaximus/github-action-get-previous-tag@master" @@ -56,3 +64,4 @@ jobs: build-args: | ACCESS_TOKEN_USR=$GITHUB_ACTOR ACCESS_TOKEN_PWD=${{ secrets.ORG_PAT_GITHUB }} + ARGOPM_VERSION=${{ steps.get_version.outputs.published_version }} diff --git a/Dockerfile b/Dockerfile index 85c1a0f..2eb679a 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,11 +1,15 @@ FROM node:20-alpine +ARG ARGOPM_VERSION + RUN mkdir /app WORKDIR /app COPY . /app -RUN npm install && npm install . -g +RUN npm install argopm@${ARGOPM_VERSION} -g + +RUN npm install ENTRYPOINT ["argopm"] \ No newline at end of file