Skip to content

Merge pull request #9 from marcellinus-witarsah/api-dev #3

Merge pull request #9 from marcellinus-witarsah/api-dev

Merge pull request #9 from marcellinus-witarsah/api-dev #3

Workflow file for this run

name: Continuous deployment for creditscoreservice API
# When this action will be executed
on:
# Automatically trigger it when detected changes in repo
push:
branches:
[ api-dev ]
paths:
- 'api/**'
- '.github/workflows/creditscoreservice-AutoDeployTrigger-a77c8c46-92c2-4a2a-bce2-4097e4f37b79.yml'
# Allow manual trigger
workflow_dispatch:
jobs:
build-and-deploy:
runs-on: ubuntu-latest
steps:
- name: Checkout to the branch
uses: actions/checkout@v4
- name: Azure Login
uses: azure/login@v1
with:
creds: ${{ secrets.CREDITSCORESERVICE_AZURE_CREDENTIALS }}
- name: Build and push container image to registry
uses: azure/container-apps-deploy-action@v2
with:
appSourcePath: ${{ github.workspace }}/api
registryUrl: creditscorecr.azurecr.io
registryUsername: ${{ secrets.CREDITSCORESERVICE_REGISTRY_USERNAME }}
registryPassword: ${{ secrets.CREDITSCORESERVICE_REGISTRY_PASSWORD }}
containerAppName: creditscoreservice
resourceGroup: personalprojects
imageToBuild: creditscorecr.azurecr.io/creditscoreservice:${{ github.sha }}