@@ -2,36 +2,37 @@ name: Build docker sample-extension-dotnet-minimalapi
22
33on :
44 push :
5- branches : [ main ]
5+ branches : [main]
66 paths :
7- - " sample-extension-dotnet-minimalapi/**"
7+ - " sample-extension-dotnet-minimalapi/**"
88 workflow_dispatch :
9- schedule :
10- - cron : ' 0 0 * * 0'
9+
10+ permissions :
11+ contents : read
1112
1213jobs :
1314 build :
1415 runs-on : ubuntu-latest
1516 steps :
16- - uses : actions/checkout@v3
17- - uses : actions/setup-dotnet@v2
18- with :
19- dotnet-version : ' 6.0.x'
20- - name : ' Build .NET Project'
21- shell : bash
22- run : |
23- pushd './sample-extension-dotnet-minimalapi/TodoApi'
24- dotnet publish -c Release
25- popd
26- - name : Build the Docker image
27- shell : bash
28- run : |
29- pushd './sample-extension-dotnet-minimalapi/'
30- make build-image
31- popd
32- - name : Slack Notify
33- uses : rtCamp/action-slack-notify@v2.2.0
34- if : ${{ failure() }}
35- env :
36- SLACK_MESSAGE : ' Build Failed for ${{ env.SAMPLE_NAME }}'
37- SLACK_WEBHOOK : ${{ secrets.BUILD_FAIL_NOTIFY_SLACK_URL }}
17+ - uses : actions/checkout@v3
18+ - uses : actions/setup-dotnet@v2
19+ with :
20+ dotnet-version : " 6.0.x"
21+ - name : " Build .NET Project"
22+ shell : bash
23+ run : |
24+ pushd './sample-extension-dotnet-minimalapi/TodoApi'
25+ dotnet publish -c Release
26+ popd
27+ - name : Build the Docker image
28+ shell : bash
29+ run : |
30+ pushd './sample-extension-dotnet-minimalapi/'
31+ make build-image
32+ popd
33+ - name : Slack Notify
34+ uses : rtCamp/action-slack-notify@v2.2.0
35+ if : ${{ failure() }}
36+ env :
37+ SLACK_MESSAGE : " Build Failed for ${{ env.SAMPLE_NAME }}"
38+ SLACK_WEBHOOK : ${{ secrets.BUILD_FAIL_NOTIFY_SLACK_URL }}
0 commit comments