Skip to content

Commit

Permalink
Create an auto-deploy file
Browse files Browse the repository at this point in the history
  • Loading branch information
sonwan2020 committed Nov 22, 2023
1 parent c6570a9 commit ab90a39
Showing 1 changed file with 42 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
name: Trigger auto deployment for albumapi

# When this action will be executed
on:
# Automatically trigger it when detected changes in repo
push:
branches:
[ main ]
paths:
- '**'
- '.github/workflows/albumapi-AutoDeployTrigger-af83eef2-d838-41b3-8e5d-f8e1e3d8dca5.yml'

# Allow manual trigger
workflow_dispatch:

jobs:
build-and-deploy:
runs-on: ubuntu-latest

steps:
- name: Checkout to the branch
uses: actions/checkout@v2

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

- name: Build and push container image to registry
uses: azure/container-apps-deploy-action@v2
with:
appSourcePath: ${{ github.workspace }}
registryUrl: ca3af3151294acr.azurecr.io
registryUsername: ${{ secrets.ALBUMAPI_REGISTRY_USERNAME }}
registryPassword: ${{ secrets.ALBUMAPI_REGISTRY_PASSWORD }}
containerAppName: albumapi
resourceGroup: sonwan
imageToBuild: ca3af3151294acr.azurecr.io/albumapi:${{ github.sha }}




0 comments on commit ab90a39

Please sign in to comment.