Skip to content

Commit

Permalink
parent 553043d
Browse files Browse the repository at this point in the history
author Jeffrey T. Fritz <csharpfritz@users.noreply.github.com> 1708093759 -0500
committer Jeffrey T. Fritz <csharpfritz@users.noreply.github.com> 1708102753 -0500

Attempt to fix container build (FritzAndFriends#363)

Attempt to fix container build (FritzAndFriends#364)

Added Action cache and latest tag

Simplified publish process

Adding Action cache and the latest tag to container image (FritzAndFriends#366)

Simplify the publish step (FritzAndFriends#367)

Returned to previous build

Updated to use csproj-based docker tag names

Attempt to fix container build (FritzAndFriends#363)

Attempt to fix container build (FritzAndFriends#364)

Fixing GH action

Fixing GH Action (FritzAndFriends#365)

Simplified publish process

Returned to previous build

Updated to use csproj-based docker tag names
  • Loading branch information
csharpfritz committed Feb 16, 2024
1 parent 553043d commit 428c012
Show file tree
Hide file tree
Showing 3 changed files with 1,489 additions and 1 deletion.
21 changes: 20 additions & 1 deletion .github/workflows/dotnet.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,16 @@ jobs:
uses: actions/setup-dotnet@v4
with:
global-json-file: ./global.json

- name: Cache NuGet Packages
id: nuget-packages
uses: actions/cache@v3
env:
cache-name: nuget-package-cache
with:
path: ~/.nuget/packages
key: ${{ runner.os }}-${{ env.cache-name }}

- name: Restore dependencies
run: dotnet restore
- name: Build
Expand Down Expand Up @@ -85,6 +95,15 @@ jobs:
with:
setAllVars: true

- name: Cache NuGet Packages
id: nuget-packages
uses: actions/cache@v3
env:
cache-name: nuget-package-cache
with:
path: ~/.nuget/packages
key: ${{ runner.os }}-${{ env.cache-name }}

- name: Restore
run: dotnet restore

Expand All @@ -93,5 +112,5 @@ jobs:
working-directory: ./src/TagzApp.Blazor

- name: Publish
run: dotnet publish --os linux --arch x64 -t:PublishContainer /p:ContainerImageTag=${{ steps.nbgv_version.outputs.Version }} /p:ContainerRegistry=ghcr.io
run: dotnet publish --os linux --arch x64 -t:PublishContainer /p:ContainerRegistry=ghcr.io
working-directory: ./src/TagzApp.Blazor
10 changes: 10 additions & 0 deletions src/TagzApp.Blazor/TagzApp.Blazor.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,12 @@
<ContainerRepository>fritzandfriends/tagzapp</ContainerRepository>
</PropertyGroup>

<Target Name="SetContainerTagTarget" BeforeTargets="CoreCompile">
<PropertyGroup>
<ContainerImageTags>$(Version);latest</ContainerImageTags>
</PropertyGroup>
</Target>

<ItemGroup>
<Content Remove="Components\FirstStartRouting.razor" />
</ItemGroup>
Expand Down Expand Up @@ -46,6 +52,10 @@
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageReference>
<PackageReference Include="Nerdbank.GitVersioning" Version="3.6.133">
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
<PrivateAssets>all</PrivateAssets>
</PackageReference>
<PackageReference Include="PSC.Blazor.Components.MarkdownEditor" Version="2.0.19" />
</ItemGroup>

Expand Down
Loading

0 comments on commit 428c012

Please sign in to comment.