Skip to content

Create docker-publish-ghcr.yml #5

Create docker-publish-ghcr.yml

Create docker-publish-ghcr.yml #5

name: Trigger auto deployment for jarvis-reloaded
# When this action will be executed
on:
# Automatically trigger it when detected changes in repo
push:
branches:
[ main ]
paths:
- '**'
- '.github/workflows/jarvis-reloaded-AutoDeployTrigger-12a0dcc3-c25a-4622-8d8b-808b2c03e488.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.JARVISRELOADED_AZURE_CLIENT_ID }}
tenant-id: ${{ secrets.JARVISRELOADED_AZURE_TENANT_ID }}
subscription-id: ${{ secrets.JARVISRELOADED_AZURE_SUBSCRIPTION_ID }}
- name: Build and push container image to registry
uses: azure/container-apps-deploy-action@v2
with:
appSourcePath: ${{ github.workspace }}
registryUrl: yusufk.azurecr.io
registryUsername: ${{ secrets.JARVISRELOADED_REGISTRY_USERNAME }}
registryPassword: ${{ secrets.JARVISRELOADED_REGISTRY_PASSWORD }}
containerAppName: jarvis-reloaded
resourceGroup: jarvis-rg
imageToBuild: yusufk.azurecr.io/jarvis-reloaded:${{ github.sha }}