Skip to content

Commit 52e3424

Browse files
Update content
1 parent 408d846 commit 52e3424

File tree

2 files changed

+30
-22
lines changed

2 files changed

+30
-22
lines changed

.github/workflows/ci_cd.yaml

Lines changed: 28 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,6 @@ env:
2020

2121
jobs:
2222
test:
23-
name: test
2423
runs-on: ubuntu-latest
2524
permissions:
2625
checks: write
@@ -104,7 +103,6 @@ jobs:
104103
recreate: true
105104

106105
publish-docker-image:
107-
name: publish-docker-image
108106
needs: test
109107
runs-on: ubuntu-latest
110108
permissions:
@@ -129,10 +127,36 @@ jobs:
129127
push: true
130128
tags: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:${{ github.sha }}
131129

132-
deploy-application:
133-
name: deploy-application
130+
deploy-development:
134131
needs: publish-docker-image
135132
runs-on: ubuntu-latest
133+
environment:
134+
url: https://${{ vars.WEBAPP_NAME }}.azurewebsites.net
135+
name: development-application
136+
permissions:
137+
contents: read
138+
steps:
139+
- name: Checkout repository
140+
uses: actions/checkout@v4
141+
142+
- name: Azure login
143+
uses: Azure/login@v2
144+
with:
145+
creds: ${{ secrets.AZURE_CREDENTIALS }}
146+
147+
- name: Configure webapp
148+
run: |
149+
az webapp config container set \
150+
--name ${{ vars.WEBAPP_NAME }} \
151+
--resource-group ${{ vars.RESOURCE_GROUP_NAME }} \
152+
--docker-custom-image-name '${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:${{ github.sha }}' \
153+
--docker-registry-server-url ${{ env.REGISTRY }} \
154+
--docker-registry-server-user ${{ github.repository_owner }} \
155+
--docker-registry-server-password ${{ secrets.PACKAGES_PAT }}
156+
157+
deploy-production:
158+
needs: deploy-development
159+
runs-on: ubuntu-latest
136160
environment:
137161
url: https://${{ vars.WEBAPP_NAME }}.azurewebsites.net
138162
name: production-application

.github/workflows/deploy_infra.yaml

Lines changed: 2 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -100,24 +100,8 @@ jobs:
100100
--deny-settings-mode 'denyDelete' \
101101
--yes
102102
103-
# approve:
104-
# name: approve-promotion
105-
# needs: deploy-development
106-
# runs-on: ubuntu-latest
107-
# permissions:
108-
# issues: write
109-
# steps:
110-
# - name: Manual approval
111-
# uses: trstringer/manual-approval@v1.9.0
112-
# with:
113-
# approvers: christosgalano
114-
# minimum-approvals: 1
115-
# issue-title: "Approve promotion to production"
116-
# secret: ${{ secrets.GITHUB_TOKEN }}
117-
118103
deploy-production:
119104
name: deploy-production
120-
# needs: approve
121105
needs: deploy-development
122106
runs-on: ubuntu-latest
123107
environment: production-infrastructure
@@ -147,7 +131,7 @@ jobs:
147131
--template-file main.bicep \
148132
--parameters environments/production.bicepparam \
149133
--action-on-unmanage 'deleteAll' \
150-
--deny-settings-mode 'denyDelete'
134+
--deny-settings-mode 'none'
151135
152136
- name: Deploy template
153137
run: |
@@ -157,5 +141,5 @@ jobs:
157141
--template-file main.bicep \
158142
--parameters environments/production.bicepparam \
159143
--action-on-unmanage 'deleteAll' \
160-
--deny-settings-mode 'denyDelete' \
144+
--deny-settings-mode 'none' \
161145
--yes

0 commit comments

Comments
 (0)