Skip to content

Commit

Permalink
Cache mounts don't seem to be supported in GitHub Actions
Browse files Browse the repository at this point in the history
  • Loading branch information
maxkagamine committed May 27, 2024
1 parent f1395a2 commit 3be13ef
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,11 @@ COPY SqliteArchive/SqliteArchive.csproj SqliteArchive/
COPY SqliteArchive.Ftp/SqliteArchive.Ftp.csproj SqliteArchive.Ftp/
COPY SqliteArchive.Server/SqliteArchive.Server.csproj SqliteArchive.Server/

RUN --mount=type=cache,id=nuget,target=/root/.nuget/packages \
dotnet restore SqliteArchive.Server/SqliteArchive.Server.csproj
RUN dotnet restore SqliteArchive.Server/SqliteArchive.Server.csproj

COPY . .

RUN --mount=type=cache,id=nuget,target=/root/.nuget/packages \
dotnet publish SqliteArchive.Server/SqliteArchive.Server.csproj \
RUN dotnet publish SqliteArchive.Server/SqliteArchive.Server.csproj \
--no-restore -c Release -o /app/publish /p:UseAppHost=false

FROM mcr.microsoft.com/dotnet/aspnet:8.0-alpine
Expand Down

0 comments on commit 3be13ef

Please sign in to comment.