Testing PR #195
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: Build Images | |
concurrency: ${{ github.ref }} | |
on: | |
push: | |
workflow_dispatch: | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
env: | |
RESOURCE_GROUP_NAME: "aqovia-devbox" | |
IDENTITY_NAME: "aqovia-devcenter-identity" | |
GALLARY_NAME: "aqovia_compute_gallery" | |
VNET_NAME: "vnetBuilder" | |
SUBNET_NAME: "default" | |
STORAGE_ACCOUNT_NAME: "aqdevboxbuilderstrg" | |
steps: | |
- uses: actions/checkout@v2 | |
- name: Login to Azure | |
run: az login --service-principal -u ${{ secrets.AZURE_CLIENT_ID }} -p ${{ secrets.AZURE_CLIENT_SECRET }} --tenant ${{ secrets.AZURE_TENANT_ID }} | |
- name: Ensure Bicep | |
run: az bicep upgrade | |
- name: Update predeploy/main.parameters.json | |
uses: restackio/[email protected] | |
with: | |
file: ./resources/predeploy/main.parameters.json | |
fields: | | |
{ | |
"identityName" : "${{env.IDENTITY_NAME}}", | |
"galleryName": "${{env.GALLARY_NAME}}" , | |
"netork.name": "${{env.VNET_NAME}}", | |
"network.subnetName": "${{env.SUBNET_NAME}}", | |
"storage.name": "${{env.STORAGE_ACCOUNT_NAME}} | |
} | |
- name: Deploy Bicep | |
working-directory: ./resources | |
run: az deployment group create | |
--resource-group ${{ env.RESOURCE_GROUP_NAME }} | |
--template-file ./predeploy/main.bicep | |
- name: Set SubnetID to Environment Variable | |
run: export ID=$(az network vnet subnet list --resource-group ${{ env.RESOURCE_GROUP_NAME }} --vnet-name ${{ env.VNET_NAME }} --query "[?name=='${{ env.SUBNET_NAME }}'].id" --output tsv); echo "SUBNET_ID=$ID" >> $GITHUB_ENV | |
- name: Set Storage Account to Environment Variable | |
run: export ID=$(az storage account list --resource-group ${{ env.RESOURCE_GROUP_NAME }} --query "[?name=='${{ env.STORAGE_ACCOUNT_NAME }}'].name" --output tsv); echo "STORAGE_ACCOUNT=$ID" >> $GITHUB_ENV | |
- name: Deploy Build ACI Containers | |
run: python "./builder/build.py" --async | |
--repository "${{ github.repositoryUrl }}" | |
--revision "${{ github.sha }}" | |
--token "${{ github.token }}" | |
--client-id "${{ secrets.AZURE_CLIENT_ID }}" | |
--client-secret "${{ secrets.AZURE_CLIENT_SECRET }}" | |
--storage-account "${{ env.STORAGE_ACCOUNT }}" | |
--subnet-id "${{ env.SUBNET_ID }}" |