testing deploying with az cli #8
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Trigger auto deployment for ansalemo-java-from-source | |
# When this action will be executed | |
on: | |
# Automatically trigger it when detected changes in repo | |
push: | |
branches: | |
[ main ] | |
paths: | |
- '**' | |
- '.github/workflows/ansalemo-java-from-source-AutoDeployTrigger-5f9142e9-3625-493b-a24d-d61e5f5eca3b.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 | |
contents: read #Required when GH token is used to authenticate with private repo | |
steps: | |
- name: Checkout to the branch | |
uses: actions/checkout@v2 | |
- name: Azure Login | |
uses: azure/login@v1 | |
with: | |
client-id: ${{ secrets.ANSALEMOJAVAFROMSOURCE_AZURE_CLIENT_ID }} | |
tenant-id: ${{ secrets.ANSALEMOJAVAFROMSOURCE_AZURE_TENANT_ID }} | |
subscription-id: ${{ secrets.ANSALEMOJAVAFROMSOURCE_AZURE_SUBSCRIPTION_ID }} | |
# - name: Build and push container image to registry | |
# uses: azure/container-apps-deploy-action@v2 | |
# with: | |
# appSourcePath: ${{ github.workspace }} | |
# registryUrl: ansalemoacr.azurecr.io | |
# registryUsername: ${{ secrets.ANSALEMOJAVAFROMSOURCE_REGISTRY_USERNAME }} | |
# registryPassword: ${{ secrets.ANSALEMOJAVAFROMSOURCE_REGISTRY_PASSWORD }} | |
# containerAppName: ansalemo-java-from-source | |
# resourceGroup: ansalemo-rg | |
# imageToBuild: ansalemoacr.azurecr.io/ansalemo-java-from-source:${{ github.sha }} | |
# _buildArgumentsKey_: | | |
# _buildArgumentsValues_ | |
- name: check AZ CLI version | |
run: az --version && az extension list-available --output table | |
- name: Install az containerapps extension | |
run: az extension add --name containerapps | |
- name: ls | |
run: ls -lrta ${{ github.workspace }} | |
- name: Deploy to Container Apps | |
run: az containerapp up -g "ansalemo-rg" -n "ansalemo-java-from-source" --source ${{ github.workspace }} --environment "ansalemo-acaenv-consumption" --build-env-vars BPM_JVM_VERSION=17 | |