Fix CI
All checks were successful
Build and Publish Docker Image / build_and_push (push) Successful in 48s

This commit is contained in:
2024-09-25 15:12:40 +00:00
parent 0e9de8deb5
commit b3c050ed9e
4 changed files with 4 additions and 9 deletions

View File

@@ -52,8 +52,6 @@ jobs:
uses: docker/build-push-action@v6
with:
context: .
build-args: |
NPM_TOKEN=${{ secrets.NPM_TOKEN }}
file: ./Dockerfile
push: true
tags: ${{ steps.set_tags.outputs.image_tags }}

1
.npmrc
View File

@@ -1,2 +1 @@
@3t.network:registry=https://git.3t.network/api/packages/3t.network/npm/
//git.3t.network/api/packages/3t.network/npm/:_authToken=${NPM_TOKEN}

View File

@@ -16,8 +16,7 @@ FROM base AS build
COPY package*.json tsconfig.json .npmrc ./
# Install
ARG NPM_TOKEN
RUN npm install --//npm.token=${NPM_TOKEN}
RUN npm install
# Copy the app
COPY src ./src
@@ -30,8 +29,7 @@ FROM node:lts-alpine
# Install dependencies but skip dev dependencies
COPY --from=build /app/package*.json /app/.npmrc ./
ARG NPM_TOKEN
RUN npm install --only=production --//npm.token=${NPM_TOKEN}
RUN npm install --only=production
# Copy the app
COPY --from=build /app/dist ./dist

View File

@@ -52,7 +52,7 @@ fi
# cd to the project root directory.
cd "$(dirname "$0")/.."
source .env
docker build --build-arg NPM_TOKEN=$NPM_TOKEN -t butlerbot:$VERSION .
docker build -t butlerbot:$VERSION .
# Tag the Docker image.
for TAG in "${TAGS[@]}"; do