Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 15 additions & 0 deletions .github/workflows/workflow-cd-azure.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
name: Workflow CD Azure
on:
workflow_dispatch:
permissions:
contents: read
jobs:
deployment:
runs-on: ubuntu-latest
steps:
- name: Azure Static Web Apps Deploy
uses: Azure/static-web-apps-deploy@v1
with:
azure_static_web_apps_api_token: ${{ secrets.AZURE_TOKEN_SSG }}
app_location: "/public"
action: "upload"
31 changes: 31 additions & 0 deletions .github/workflows/workflow-cd.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
name: Workflow CD
description: Testing a workflow CD
on: pull_request
permissions:
contents: read
jobs:
deployment:
runs-on: ubuntu-latest
environment: "Development"
steps:
- name: Azure Login
uses: Azure/login@v2.3.0
with:
creds: ${{ secrets.AZURE_CREDENTIALS }}

- uses: azure/docker-login@v2
with:
login-server: ${{env.IMAGE_REGISTRY_URL}}
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}

- name: Deploy web app container
uses: Azure/webapps-deploy@v2.2.17
with:
app-name: ${{env.AZURE_WEBAPP_NAME}}
images: ${{env.IMAGE_REGISTRY_URL}}/${{ github.repository }}/${{env.DOCKER_IMAGE_NAME}}:${{ github.sha }}

- name: Azure logout
run: |
az logout

5 changes: 3 additions & 2 deletions .github/workflows/workflow-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,19 +2,20 @@ name: Workflow CI
description: A workflow that calls reusable and composite workflows
permissions:
contents: read
on: [pull_request]
on: [push, pull_request]
jobs:
call-reusable-workflow:
uses: ./.github/workflows/reusable-workflow-for-ci.yml

call-composite-workflow:
runs-on: ubuntu-latest
environment: Development
steps:
- name: Checkout repository
uses: actions/checkout@v4

- name: Call Greeting Workflow
uses: ./.github/workflows/utilities/composite-workflow
with:
name: "Desarrollador"
name: "Environment: ${{ vars.ENVIRONMENT_NAME }}"
message: "Hola"
11 changes: 11 additions & 0 deletions public/index.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Document</title>
</head>
<body>
<h1>Deployment Actions with Azure</h1>
</body>
</html>
Loading