Skip to content

Commit

Permalink
Create an auto-deploy file
Browse files Browse the repository at this point in the history
  • Loading branch information
kokelowo committed Nov 14, 2023
1 parent f0e733b commit 51f5334
Showing 1 changed file with 45 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
name: Trigger auto deployment for s2c-cb-south-existing-env-myapp2

# When this action will be executed
on:
# Automatically trigger it when detected changes in repo
push:
branches:
[ main ]
paths:
- '**'
- '.github/workflows/s2c-cb-south-existing-env-myapp2-AutoDeployTrigger-164b1789-ab68-4f24-98fa-e9635a1c9ea3.yml'

# Allow manual trigger
workflow_dispatch:

jobs:
build-and-deploy:
runs-on: ubuntu-latest
permissions:
id-token: write #This is required for requesting the OIDC JWT Token

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

- name: Azure Login
uses: azure/login@v1
with:
client-id: ${{ secrets.S2CCBSOUTHEXISTINGENVMYAPP2_AZURE_CLIENT_ID }}
tenant-id: ${{ secrets.S2CCBSOUTHEXISTINGENVMYAPP2_AZURE_TENANT_ID }}
subscription-id: ${{ secrets.S2CCBSOUTHEXISTINGENVMYAPP2_AZURE_SUBSCRIPTION_ID }}

- name: Build and push container image to registry
uses: azure/container-apps-deploy-action@v2
with:
appSourcePath: ${{ github.workspace }}
registryUrl:
registryUsername: ${{ secrets.S2CCBSOUTHEXISTINGENVMYAPP2_REGISTRY_USERNAME }}
registryPassword: ${{ secrets.S2CCBSOUTHEXISTINGENVMYAPP2_REGISTRY_PASSWORD }}
containerAppName: s2c-cb-south-existing-env-myapp2
resourceGroup: kokelowo-containers
imageToBuild: default/[parameters('containerAppName')]:${{ github.sha }}



0 comments on commit 51f5334

Please sign in to comment.