Skip to content

Commit 7e693cd

Browse files
author
Frederic Wickert
committed
Docker to deploy
1 parent 16e3ed6 commit 7e693cd

File tree

1 file changed

+62
-2
lines changed

1 file changed

+62
-2
lines changed

.github/workflows/deploy.yml

Lines changed: 62 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ env:
55
repositoryName: techexcel/dotnetcoreapp
66
dockerFolderPath: ./src/Application/src/RazorPagesTestSample
77
tag: ${{github.run_number}}
8-
8+
99
on:
1010
push:
1111
branches: [ main ]
@@ -35,7 +35,6 @@ jobs:
3535
run: dotnet test --no-build --verbosity normal ./src/Application/tests/RazorPagesTestSample.Tests/RazorPagesTestSample.Tests.csproj
3636

3737
dockerBuildPush:
38-
3938
runs-on: ubuntu-latest
4039
needs: build
4140

@@ -61,3 +60,64 @@ jobs:
6160

6261
- name: Docker Push
6362
run: docker push $registryName/$repositoryName:$tag
63+
64+
deploy-to-dev:
65+
66+
runs-on: ubuntu-latest
67+
needs: dockerBuildPush
68+
environment:
69+
name: dev
70+
url: https://p5tgcusa4unsu-dev.azurewebsites.net/
71+
72+
steps:
73+
- name: 'Login via Azure CLI'
74+
uses: azure/[email protected]
75+
with:
76+
creds: ${{ secrets.AZURE_CREDENTIALS }}
77+
78+
- uses: azure/webapps-deploy@v2
79+
with:
80+
app-name: 'p5tgcusa4unsu-dev'
81+
images: p5tgcusa4unsumpnpreg.azurecr.io/techexcel/dotnetcoreapp:${{github.run_number}}
82+
83+
deploy-to-test:
84+
85+
runs-on: ubuntu-latest
86+
needs: deploy-to-dev
87+
environment:
88+
name: test
89+
url: https://p5tgcusa4unsu-test.azurewebsites.net/
90+
91+
steps:
92+
- uses: actions/checkout@v3
93+
94+
- name: 'Login via Azure CLI'
95+
uses: azure/[email protected]
96+
with:
97+
creds: ${{ secrets.AZURE_CREDENTIALS }}
98+
99+
- uses: azure/webapps-deploy@v2
100+
with:
101+
app-name: 'p5tgcusa4unsu-test'
102+
images: p5tgcusa4unsumpnpreg.azurecr.io/techexcel/dotnetcoreapp:${{github.run_number}}
103+
104+
deploy-to-prod:
105+
106+
runs-on: ubuntu-latest
107+
needs: deploy-to-test
108+
environment:
109+
name: prod
110+
url: https://p5tgcusa4unsu-prod.azurewebsites.net/
111+
112+
steps:
113+
- uses: actions/checkout@v3
114+
115+
- name: 'Login via Azure CLI'
116+
uses: azure/[email protected]
117+
with:
118+
creds: ${{ secrets.AZURE_CREDENTIALS }}
119+
120+
- uses: azure/webapps-deploy@v2
121+
with:
122+
app-name: 'p5tgcusa4unsu-prod'
123+
images: p5tgcusa4unsumpnpreg.azurecr.io /techexcel/dotnetcoreapp:${{github.run_number}}

0 commit comments

Comments
 (0)