File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 3434 with :
3535 path : " server/csharp-server"
3636 name : server-csharp-${{ inputs.version }}
37+
38+ - name : Upload csharp-server docker artifact
39+ uses : actions/upload-artifact@v4
40+ with :
41+ path : " server/Dockerfile"
42+ name : server-csharp-docker-${{ inputs.version }}
Original file line number Diff line number Diff line change @@ -200,6 +200,30 @@ jobs:
200200 asset_content_type : " application/gzip"
201201
202202
203+ # ## PUBLISH DOCKER
204+ publishdocker :
205+ name : " Publish docker packages"
206+ runs-on : ubuntu-latest
207+ needs : [publish]
208+ permissions :
209+ packages : write
210+ contents : read
211+ steps :
212+ - name : " Get the artefacts"
213+ uses : actions/download-artifact@v4
214+ with :
215+ path : .
216+ name : sdk-csharp-docker-${{ inputs.version }}
217+ - run : ls -la
218+ - run : |
219+ docker build . -t ghcr.io/NHSDigital/nhsnotifysupplierserver:latest
220+ echo $CR_PAT | docker login ghcr.io -u NHSDigital --password-stdin
221+ docker push ghcr.io/NHSDigital/nhsnotifysupplierserver:latest
222+
223+ env:
224+ CR_PAT: ${{ secrets.GITHUB_TOKEN }}
225+
226+
203227# ## PUBLISH NUGET
204228 publishnuget :
205229 name : " Publish nuget packages to nuget.pkg.github.com"
Original file line number Diff line number Diff line change @@ -24,6 +24,7 @@ deploy: # Deploy the project artefact to the target environment @Pipeline
2424clean :: # Clean-up project resources (main) @Operations
2525 rm -f .version
2626 (cd sdk && make clean)
27+ (cd server && make clean)
2728
2829serve :
2930 npm run serve
Original file line number Diff line number Diff line change 1- version : 0.2.0-20250704.123517+417d15b
1+ version : 0.2.0-20250704.123845+a16df0f
Original file line number Diff line number Diff line change 1+ FROM mcr.microsoft.com/dotnet/aspnet:8.0
2+
3+ WORKDIR /App
4+ COPY csharp-server/src/nhsnotifysupplierserver/bin/Release/net8.0 .
5+ RUN mkdir -p /workspaces/nhs-notify-supplier-api/server/csharp-server/src/nhsnotifysupplierserver/wwwroot
6+ COPY csharp-server/src/nhsnotifysupplierserver/wwwroot/* /workspaces/nhs-notify-supplier-api/server/csharp-server/src/nhsnotifysupplierserver/wwwroot/
7+ RUN ls -la /workspaces/nhs-notify-supplier-api/server/csharp-server/src/nhsnotifysupplierserver/wwwroot && \
8+ pwd
9+ ENV ASPNETCORE_ENVIRONMENT="Development"
10+ ENTRYPOINT ["dotnet" , "nhsnotifysupplierserver.dll" ]
Original file line number Diff line number Diff line change 1+ # Gets from the latest pre release
2+
3+ FROM mcr.microsoft.com/dotnet/sdk:8.0 AS build
4+ RUN apt-get update && \
5+ apt-get install -y \
6+ jq \
7+ curl \
8+ unzip
9+
10+ RUN releases=$(curl https://api.github.com/repos/NHSDigital/nhs-notify-supplier-api/releases) && \
11+ latest=$(echo $releases | jq -r 'map(select(.prerelease)) | first | .tag_name') && \
12+ encoded=$(jq -rn --arg x $latest '$x|@uri') && \
13+ echo $latest && \
14+ url="https://github.com/NHSDigital/nhs-notify-supplier-api/releases/download/$encoded/server-csharp-$latest.zip" && \
15+ echo $url && \
16+ echo $encoded && \
17+ curl -Lo ./server.zip $url && \
18+ unzip server.zip && \
19+ cd src/nhsnotifysupplierserver && \
20+ dotnet build --configuration Release && \
21+ ls -la bin/Release/net8.0
22+
23+ FROM mcr.microsoft.com/dotnet/aspnet:8.0
24+
25+ WORKDIR /App
26+ COPY --from=build /src/nhsnotifysupplierserver/bin/Release/net8.0 .
27+ RUN mkdir -p /src/nhsnotifysupplierserver/wwwroot
28+ COPY --from=build src/nhsnotifysupplierserver/wwwroot/* /src/nhsnotifysupplierserver/wwwroot
29+ RUN ls -la /src/nhsnotifysupplierserver/wwwroot && \
30+ pwd
31+ ENV ASPNETCORE_ENVIRONMENT="Development"
32+ ENTRYPOINT ["dotnet", "nhsnotifysupplierserver.dll"]
Original file line number Diff line number Diff line change 1- version : 1.1.1
1+ version : 0.2.0-20250704.123842+a16df0f
You can’t perform that action at this time.
0 commit comments