Skip to content

Commit f14f123

Browse files
Update workflow-cd.yml
1 parent 53b3e9b commit f14f123

1 file changed

Lines changed: 21 additions & 12 deletions

File tree

.github/workflows/workflow-cd.yml

Lines changed: 21 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,22 +1,31 @@
11
name: Workflow CD
22
description: Testing a workflow CD
3-
on: push
3+
on: pull_request
44
permissions:
55
contents: read
66
jobs:
77
deployment:
88
runs-on: ubuntu-latest
99
environment: "Development"
1010
steps:
11-
- name: Crear deployment
12-
uses: actions/github-script@v8
11+
- name: Azure Login
12+
uses: Azure/login@v2.3.0
1313
with:
14-
script: |
15-
github.rest.repos.createDeployment({
16-
owner: context.repo.owner,
17-
repo: context.repo.repo,
18-
ref: context.ref,
19-
environment: 'Development',
20-
auto_merge: false,
21-
required_contexts: []
22-
})
14+
creds: ${{ secrets.AZURE_CREDENTIALS }}
15+
16+
- uses: azure/docker-login@v2
17+
with:
18+
login-server: ${{env.IMAGE_REGISTRY_URL}}
19+
username: ${{ github.actor }}
20+
password: ${{ secrets.GITHUB_TOKEN }}
21+
22+
- name: Deploy web app container
23+
uses: Azure/webapps-deploy@v2.2.17
24+
with:
25+
app-name: ${{env.AZURE_WEBAPP_NAME}}
26+
images: ${{env.IMAGE_REGISTRY_URL}}/${{ github.repository }}/${{env.DOCKER_IMAGE_NAME}}:${{ github.sha }}
27+
28+
- name: Azure logout
29+
run: |
30+
az logout
31+

0 commit comments

Comments
 (0)