Skip to content

Commit

Permalink
Merge pull request #11 from loanmarket/chore/TECH-30764-Improve-Build…
Browse files Browse the repository at this point in the history
…-Pipeline

TECH-30764 Remove Creds from Nuget.Config
  • Loading branch information
AliArmanLMG authored Sep 10, 2024
2 parents ca572d2 + 1949164 commit 1b5b8fe
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 8 deletions.
7 changes: 5 additions & 2 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,11 +20,14 @@ jobs:
- name: Test Samples
run: dotnet test --no-restore --verbosity normal ./samples/MyCRM.Lodgement.Sample.Tests/MyCRM.Lodgement.Sample.Tests.csproj
- name: Build Docker image
run: docker build . -f ./samples/MyCRM.Lodgement.Sample/Dockerfile -t lodgementsample:latest
run: |
echo ${{secrets.LOAN_MARKET_TOKEN_READ_ONLY }}> ./nugetLoginToken.secret
docker build . -f ./samples/MyCRM.Lodgement.Sample/Dockerfile -t lodgementsample:latest --secret id=NUGET_LOGIN_TOKEN,src=./nugetLoginToken.secret
- name: Save Docker image to file
run: docker save lodgementsample:latest -o lodgementsample-docker-image.tar
- name: Save Docker image as an artifact
uses: actions/upload-artifact@v3
with:
name: lodgementsample-docker-image
path: lodgementsample-docker-image.tar
path: lodgementsample-docker-image.tar

2 changes: 2 additions & 0 deletions samples/MyCRM.Lodgement.Sample/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,8 @@ RUN dotnet publish \
--configuration Release \
--output "/app/publish"



FROM mcr.microsoft.com/dotnet/aspnet:8.0-bookworm-slim AS final
WORKDIR /app
COPY --from=build /app/publish .
Expand Down
7 changes: 1 addition & 6 deletions samples/NuGet.Config
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,7 @@
<add key="nuget.org" value="https://api.nuget.org/v3/index.json" />
<add key="lmgithubnuget" value="https://nuget.pkg.github.com/loanmarket/index.json" />
</packageSources>
<packageSourceCredentials>
<lmgithubnuget>
<add key="Username" value="license.admin@loanmarket.com.au" />
<add key="ClearTextPassword" value="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" />
</lmgithubnuget>
</packageSourceCredentials>

<packageSourceMapping>
<packageSource key="nuget.org">
<package pattern="*" />
Expand Down

0 comments on commit 1b5b8fe

Please sign in to comment.