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 3ff82fb commit ed2d4d1
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 hellospring-source-17

# When this action will be executed
on:
# Automatically trigger it when detected changes in repo
push:
branches:
[ main ]
paths:
- '**'
- '.github/workflows/hellospring-source-17-AutoDeployTrigger-898dc641-f7e2-4076-bedf-8477009f4eb3.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.HELLOSPRINGSOURCE17_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.HELLOSPRINGSOURCE17_REGISTRY_USERNAME }}
registryPassword: ${{ secrets.HELLOSPRINGSOURCE17_REGISTRY_PASSWORD }}
containerAppName: hellospring-source-17
resourceGroup: qiaolei-bugbash-rg
imageToBuild: qiaoleibugbash.azurecr.io/hellospring-source-17:${{ github.sha }}




0 comments on commit ed2d4d1

Please sign in to comment.