Skip to content

Commit

Permalink
issue #15: add deploy
Browse files Browse the repository at this point in the history
  • Loading branch information
vivalareda committed Dec 8, 2023
1 parent 168e949 commit b6da1fb
Showing 1 changed file with 29 additions and 0 deletions.
29 changes: 29 additions & 0 deletions .github/workflows/azure-deployment.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,3 +14,32 @@ jobs:
container-name: ${{ github.event.repository.name }}
tag: ${{ github.sha }}
secrets: inherit

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: Build and push Docker image to Azure Container Registry
uses: azure/docker-login@v1
with:
login-server: ${{ secrets.AZURE_CONTAINER_REGISTRY }}
username: ${{ secrets.AZURE_REGISTRY_USERNAME }}
password: ${{ secrets.AZURE_REGISTRY_PASSWORD }}
run: |
docker build -t ${{ secrets.AZURE_CONTAINER_REGISTRY }}/${{ inputs.container-name }}:${{ inputs.tag }} .
docker push ${{ secrets.AZURE_CONTAINER_REGISTRY }}/${{ inputs.container-name }}:${{ inputs.tag }}
- name: Deploy to Azure App Service
uses: azure/webapps-deploy@v2
with:
app-name: ${{ inputs.container-name }}
slot-name: production
publish-profile: ${{ secrets.AZURE_PUBLISH_PROFILE }}
images: ${{ secrets.AZURE_CONTAINER_REGISTRY }}/${{ inputs.container-name }}:${{ inputs.tag }}

0 comments on commit b6da1fb

Please sign in to comment.