Skip to content

Commit

Permalink
ci: use pnpm
Browse files Browse the repository at this point in the history
  • Loading branch information
GZTimeWalker committed Nov 6, 2022
1 parent 115b614 commit 87d17b0
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 3 deletions.
6 changes: 4 additions & 2 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,15 +30,17 @@ jobs:
with:
node-version: 18

- run: npm i -g pnpm

- run: dotnet build "CTFServer.csproj" -c Release -o build

- run: dotnet publish "CTFServer.csproj" -c Release -o publish/linux/amd64 -r linux-x64 --no-self-contained /p:PublishReadyToRun=true /p:UseNpm=true
- run: dotnet publish "CTFServer.csproj" -c Release -o publish/linux/amd64 -r linux-x64 --no-self-contained /p:PublishReadyToRun=true
env:
VITE_APP_BUILD_TIMESTAMP: ${{ steps.time.outputs.time }}
VITE_APP_GIT_SHA: ${{ github.sha }}
VITE_APP_GIT_NAME: ${{ github.ref_name }}

- run: dotnet publish "CTFServer.csproj" -c Release -o publish/linux/arm64 -r linux-arm64 --no-self-contained /p:PublishReadyToRun=true /p:UseNpm=true
- run: dotnet publish "CTFServer.csproj" -c Release -o publish/linux/arm64 -r linux-arm64 --no-self-contained /p:PublishReadyToRun=true
env:
VITE_APP_BUILD_TIMESTAMP: ${{ steps.time.outputs.time }}
VITE_APP_GIT_SHA: ${{ github.sha }}
Expand Down
4 changes: 3 additions & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -13,13 +13,15 @@ RUN apt update && \
wget -qO- https://deb.nodesource.com/setup_18.x | bash - && \
apt install -y build-essential nodejs

RUN npm i -g pnpm

COPY ["GZCTF", "/src/GZCTF/"]
WORKDIR "/src/GZCTF"
RUN dotnet restore "CTFServer.csproj"
RUN dotnet build "CTFServer.csproj" -c Release -o /app/build --no-restore

FROM build AS publish
RUN dotnet publish "CTFServer.csproj" -c Release -o /app/publish -r linux-x64 --no-self-contained /p:PublishReadyToRun=true /p:UseNpm=true
RUN dotnet publish "CTFServer.csproj" -c Release -o /app/publish -r linux-x64 --no-self-contained /p:PublishReadyToRun=true

FROM mcr.microsoft.com/dotnet/aspnet:6.0 AS final
WORKDIR /app
Expand Down

0 comments on commit 87d17b0

Please sign in to comment.