Build Images #106
Workflow file for this run
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: | |
workflow_dispatch: | |
push: | |
branches: [main] | |
paths: | |
- 'images/**' | |
- 'scripts/**' | |
# - 'builder/**' | |
jobs: | |
build: | |
# runs-on: windows-latest | |
runs-on: ubuntu-latest | |
if: "!contains(join(github.event.commits.*.message), '+nobuild')" | |
env: | |
STORAGE_ACCOUNT: experimentdevboxstg | |
SUBNET_ID: /subscriptions/0f92b314-edeb-402a-8e41-88c1cfee638c/resourceGroups/devbox-experiment-ivan/providers/Microsoft.Network/virtualNetworks/v-net-dev-box/subnets/builders | |
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 }} | |
# az cli installs bicep on demand the first time it's used | |
# using the --async argument in the command below simultaniously invokes several commands that use bicep | |
# so if bicep isn't already installed, the all initiate the install which throws a file busy error so we | |
# execute an arbitrary az bicep command here (and get the latest updates in the process) | |
- name: Ensure Bicep | |
run: az bicep upgrade | |
- 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 }}" |