You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: github/github_workflow_simplified.yml
+31-3Lines changed: 31 additions & 3 deletions
Original file line number
Diff line number
Diff line change
@@ -3,7 +3,6 @@ name: Build, Test and Deploy a .NET Core WebApi to Azure App Service
3
3
env: # Change these settings if you like
4
4
ARTIFACT_NAME: WebApi
5
5
DOTNET_CORE_VERSION: 9.0.x
6
-
WORKING_DIRECTORY: "./ProjectMap.WebApi"
7
6
PUBLISH_DIRECTORY: "./out/publish"
8
7
on:
9
8
push:
@@ -15,10 +14,39 @@ on:
15
14
workflow_dispatch:
16
15
17
16
jobs:
17
+
check: # checking if the secrets exist (src: https://stackoverflow.com/questions/72925899/github-actions-detect-if-secret-exists)
18
+
runs-on: ubuntu-latest
19
+
steps:
20
+
- name: "Check if AZURE_WEBAPP_NAME secret exists"
21
+
env:
22
+
super_secret: ${{ secrets.AZURE_WEBAPP_NAME }}
23
+
if: ${{ env.super_secret == '' }}
24
+
run: 'echo "echo the secret \"AZURE_WEBAPP_NAME\" has not been made; echo please go to \"settings \> Actions secrets and variables \> actions\" to create it"; exit 1;'
25
+
26
+
- name: "Check if AZURE_WEBAPP_PUBLISH_PASSWORD secret exists"
run: 'echo "echo the secret \"AZURE_WEBAPP_PUBLISH_PASSWORD\" has not been made; echo please go to \"settings \> Actions secrets and variables \> actions \" to create it"; exit 1;'
31
+
32
+
- name: "Check if AZURE_WEBAPP_PUBLISH_USERNAME secret exists"
run: 'echo "echo the secret \"AZURE_WEBAPP_PUBLISH_USERNAME\" has not been made; echo please go to \"settings \> Actions secrets and variables \> actions\" to create it"; exit 1;'
37
+
38
+
- name: "Check if WEBAPI_PROJECT_NAME secret exists"
39
+
env:
40
+
super_secret: ${{ secrets.WEBAPI_PROJECT_NAME }}
41
+
if: ${{ env.super_secret == '' }}
42
+
run: 'echo "echo the secret \"WEBAPI_PROJECT_NAME\" has not been made; echo please go to \"settings \> Actions secrets and variables \> actions\" to create it"; exit 1;'
0 commit comments