Skip to content

Commit

Permalink
Add protected nuget feed credentials
Browse files Browse the repository at this point in the history
  • Loading branch information
DrizzlyOwl committed Jan 6, 2025
1 parent 743668e commit 98daae7
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,10 @@ RUN ["tdnf", "update", "--security", "-y"]
RUN ["tdnf", "install", "-y", "jq"]
RUN ["tdnf", "clean", "all"]
COPY ConcernsCaseWork/. .

# Mount GitHub Token as a Docker secret so that NuGet Feed can be accessed
RUN --mount=type=secret,id=github_token dotnet nuget add source --username USERNAME --password $(cat /run/secrets/github_token) --store-password-in-clear-text --name github "https://nuget.pkg.github.com/DFE-Digital/index.json"

RUN dotnet restore ConcernsCaseWork
RUN dotnet build ConcernsCaseWork "/p:customBuildMessage=Manifest commit SHA... ${COMMIT_SHA};" -c Release
RUN dotnet publish ConcernsCaseWork -c Release -o /app --no-build
Expand Down

0 comments on commit 98daae7

Please sign in to comment.