feat(dir): ️ enable nuget cache in build pipeline

This commit is contained in:
Collin Barrett 2024-06-13 16:37:31 -05:00
parent a0c1724060
commit 02e0a980d9
3 changed files with 1179 additions and 4 deletions

View file

@ -37,17 +37,28 @@ jobs:
- name: Checkout
uses: actions/checkout@v4
- name: Setup .NET
uses: actions/setup-dotnet@v4
with:
cache-dependency-path: services/Directory/FilterLists.Directory.Api/packages.lock.json
cache: true
- name: Restore
run: dotnet restore --locked-mode
working-directory: ./services/Directory/FilterLists.Directory.Api
- name: Build
run: dotnet build -c Release
working-directory: ./services/Directory/FilterLists.Directory.Api
- name: Login to Container Registry
if: github.event_name == 'push'
uses: docker/login-action@v3
with:
registry: ${{ env.CONTAINER_REGISTRY }}
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Build
run: dotnet build -c Release
working-directory: ./services/Directory/FilterLists.Directory.Api
- name: Publish & Push
if: github.event_name == 'push'
run: >

View file

@ -8,6 +8,8 @@
</PropertyGroup>
<PropertyGroup>
<RestorePackagesWithLockFile>true</RestorePackagesWithLockFile>
<DisableImplicitNuGetFallbackFolder>true</DisableImplicitNuGetFallbackFolder>
<PublishReadyToRunComposite>true</PublishReadyToRunComposite>
<ContainerBaseImage>mcr.microsoft.com/dotnet/runtime-deps:8.0-jammy-chiseled-extra</ContainerBaseImage>
<ContainerRuntimeIdentifier>linux-x64</ContainerRuntimeIdentifier>

File diff suppressed because it is too large Load diff