Skip to content

Commit 7bfe10d

Browse files
committed
Update image building pipeline
1 parent 70f0f5b commit 7bfe10d

File tree

2 files changed

+4
-1
lines changed

2 files changed

+4
-1
lines changed

.github/workflows/build_docker_image.yml

+3-1
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,9 @@ jobs:
3131
password: ${{ secrets.GITHUB_TOKEN }}
3232

3333
- name: Build and Push Docker Image
34+
env:
35+
NUGET_API_KEY: ${{ secrets.NUGET_API_KEY }} # Reference the secret
3436
run: |
35-
docker build -t ghcr.io/bardin08/trumpee-gateway:${{ github.event.release.tag_name}} --build-arg NUGET_API_KEY=${{ secrets.SECRET_TOKEN }} .
37+
docker build -t ghcr.io/bardin08/trumpee-gateway:${{ github.event.release.tag_name}} --build-arg NUGET_API_KEY=$NUGET_API_KEY .
3638
docker tag ghcr.io/bardin08/trumpee-gateway:${{ github.event.release.tag_name}} ghcr.io/bardin08/trumpee-gateway:latest
3739
docker push ghcr.io/bardin08/trumpee-gateway --all-tags

Dockerfile

+1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
ARG NUGET_API_KEY
2+
ENV NUGET_API_KEY=$NUGET_API_KEY
23

34
# STAGE 1: Build Environment
45
FROM mcr.microsoft.com/dotnet/sdk:8.0-alpine AS build-env

0 commit comments

Comments
 (0)