File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 55 branches : [ master ]
66 pull_request :
77 branches : [ master ]
8+ workflow_dispatch : {}
89
910jobs :
1011 build :
11-
1212 runs-on : ubuntu-latest
13-
13+ permissions :
14+ packages : write
15+ contents : read
16+ env :
17+ IMAGE_NAME : ghcr.io/${{ github.repository }}
18+ PUBLISH : ${{ github.ref == 'refs/heads/master' }}
1419 steps :
1520 - uses : actions/checkout@v2
16- - name : Setup .NET 7
17- uses : actions/setup-dotnet@v1
21+ - uses : docker/setup-buildx-action@v2
22+ id : buildx
23+ with :
24+ install : true
25+ version : latest
26+ - uses : docker/login-action@v2
27+ if : ${{ env.PUBLISH }}
28+ with :
29+ registry : ghcr.io
30+ username : ${{ github.actor }}
31+ password : ${{ secrets.GITHUB_TOKEN }}
32+ - id : meta
33+ uses : docker/metadata-action@v4
34+ with :
35+ images : ${{ env.IMAGE_NAME }}
36+ tags : |
37+ type=sha
38+ type=edge
39+ type=raw,value=latest,enable={{is_default_branch}}
40+ - uses : docker/build-push-action@v3
41+ id : build
1842 with :
19- dotnet-version : 7.0.100-rc.1.22431.12
20- - name : Install dependencies
21- run : dotnet restore
22- - name : Build
23- run : dotnet build --configuration Release --no-restore
43+ file : Dockerfile
44+ context : .
45+ push : ${{ env.PUBLISH }}
46+ tags : ${{ steps.meta.outputs.tags }}
47+ labels : ${{ steps.meta.outputs.labels }}
Original file line number Diff line number Diff line change @@ -11,4 +11,8 @@ RUN dotnet publish -c release -o /app
1111FROM mcr.microsoft.com/dotnet/aspnet:7.0
1212WORKDIR /app
1313COPY --from=build /app ./
14+
15+ LABEL org.opencontainers.image.source=https://github.com/tobyash86/WebGoat.NET
16+ LABEL org.opencontainers.image.description="WebGoat.NETCore - port of original WebGoat.NET to .NET Core"
17+
1418ENTRYPOINT ["dotnet" , "WebGoat.NET.dll" ]
You can’t perform that action at this time.
0 commit comments