Skip to content

Commit

Permalink
issue #55: add azure deployment
Browse files Browse the repository at this point in the history
  • Loading branch information
vivalareda committed Dec 8, 2023
1 parent df978ae commit 40ad3b0
Showing 1 changed file with 43 additions and 0 deletions.
43 changes: 43 additions & 0 deletions .github/workflows/workflow-deploy-azure.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
name: Reusable Docker container deployment to Google Cloud Run

on:
workflow_call:
inputs:
container-name:
required: true
type: string
tag:
required: true
type: string

jobs:
deploy:
runs-on: ubuntu-latest
steps:
- name: Checkout Code
uses: actions/checkout@v2

- name: Login to Azure
uses: azure/login@v1
with:
creds: ${{ secrets.AZURE_CREDENTIALS }}

- name: Azure Docker Login
uses: azure/docker-login@v1
with:
login-server: ${{ secrets.ACR_REGISTRY_NAME }}
username: ${{ secrets.ACR_USERNAME }}
password: ${{ secrets.ACR_PASSWORD }}

- name: Build and push Docker image
run: |
docker build -t ${{ secrets.ACR_REGISTRY_NAME }}/${{ inputs.container-name }}:${{ inputs.tag }} .
docker push ${{ secrets.ACR_REGISTRY_NAME }}/${{ inputs.container-name }}:${{ inputs.tag }}
- name: Deploy to Azure App Service
uses: azure/webapps-deploy@v2
with:
app-name: ${{ github.event.repository.name }}
slot-name: production
publish-profile: ${{ secrets.AZURE_PUBLISH_PROFILE }}
images: ${{ secrets.ACR_REGISTRY_NAME }}/${{ inputs.container-name }}:${{ inputs.tag }}

0 comments on commit 40ad3b0

Please sign in to comment.