Skip to content
This repository has been archived by the owner on Feb 29, 2024. It is now read-only.

Merge pull request #300 from kmcwebdev/development #56

Merge pull request #300 from kmcwebdev/development

Merge pull request #300 from kmcwebdev/development #56

name: Trigger auto deployment for erp-v2-nestjs-api
# When this action will be executed
on:
# Automatically trigger it when detected changes in repo
push:
branches:
[ main ]
paths:
- '**'
- '.github/workflows/erp-v2-nestjs-api-AutoDeployTrigger-a2348f4b-f7d7-4cbc-a9ce-ba6af0f64548.yml'
# Allow manual trigger
workflow_dispatch:
jobs:
build-and-deploy:
runs-on: ubuntu-latest
permissions:
id-token: write #This is required for requesting the OIDC JWT Token
steps:
- name: Checkout to the branch
uses: actions/checkout@v2
- name: Azure Login
uses: azure/login@v1
with:
client-id: ${{ secrets.ERPV2NESTJSAPI_AZURE_CLIENT_ID }}
tenant-id: ${{ secrets.ERPV2NESTJSAPI_AZURE_TENANT_ID }}
subscription-id: ${{ secrets.ERPV2NESTJSAPI_AZURE_SUBSCRIPTION_ID }}
- name: Build and push container image to registry
uses: azure/container-apps-deploy-action@v1
with:
appSourcePath: ${{ github.workspace }}
registryUrl: kmccontainerhub.azurecr.io
registryUsername: ${{ secrets.ERPV2NESTJSAPI_REGISTRY_USERNAME }}
registryPassword: ${{ secrets.ERPV2NESTJSAPI_REGISTRY_PASSWORD }}
containerAppName: erp-v2-nestjs-api
resourceGroup: ERP_CONTAINER_APP
imageToBuild: kmccontainerhub.azurecr.io/erp-v2-nestjs-api:${{ github.sha }}
dockerfilePath: Dockerfile