Skip to content

Commit

Permalink
Create an auto-deploy file
Browse files Browse the repository at this point in the history
  • Loading branch information
Ajsalemo committed Jul 12, 2023
1 parent f159b03 commit 0df26a2
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 ansalemo-gh-actions-acaenv

# When this action will be executed
on:
# Automatically trigger it when detected changes in repo
push:
branches:
[ main ]
paths:
- '**'
- '.github/workflows/ansalemo-gh-actions-acaenv-AutoDeployTrigger-f0ac9221-e2de-4e63-837d-4c63417f66be.yml'

# Allow mannually 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.ANSALEMOGHACTIONSACAENV_AZURE_CREDENTIALS }}

- name: Build and push container image to registry
uses: azure/container-apps-deploy-action@v1
with:
appSourcePath: ${{ github.workspace }}
registryUrl: ansalemoacr.azurecr.io
registryUsername: ${{ secrets.ANSALEMOGHACTIONSACAENV_REGISTRY_USERNAME }}
registryPassword: ${{ secrets.ANSALEMOGHACTIONSACAENV_REGISTRY_PASSWORD }}
containerAppName: ansalemo-gh-actions-acaenv
resourceGroup: ansalemo-rg
imageToBuild: ansalemoacr.azurecr.io/ansalemo-gh-actions-acaenv:${{ github.sha }}




0 comments on commit 0df26a2

Please sign in to comment.