Skip to content

Commit

Permalink
Create an auto-deploy file
Browse files Browse the repository at this point in the history
  • Loading branch information
qiaoleiatms committed Nov 10, 2023
1 parent 669c219 commit 3ff82fb
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 spring-repo-17-with-registry

# When this action will be executed
on:
# Automatically trigger it when detected changes in repo
push:
branches:
[ main ]
paths:
- '**'
- '.github/workflows/spring-repo-17-with-registry-AutoDeployTrigger-952e3a82-8e57-46ea-b6f5-a8ae4e98bfbd.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.SPRINGREPO17WITHREGISTRY_AZURE_CREDENTIALS }}

- name: Build and push container image to registry
uses: azure/container-apps-deploy-action@v2
with:
appSourcePath: ${{ github.workspace }}
registryUrl: qiaoleibugbash.azurecr.io
registryUsername: ${{ secrets.SPRINGREPO17WITHREGISTRY_REGISTRY_USERNAME }}
registryPassword: ${{ secrets.SPRINGREPO17WITHREGISTRY_REGISTRY_PASSWORD }}
containerAppName: spring-repo-17-with-registry
resourceGroup: qiaolei-bugbash-rg
imageToBuild: qiaoleibugbash.azurecr.io/spring-repo-17-with-registry:${{ github.sha }}




0 comments on commit 3ff82fb

Please sign in to comment.