Skip to content

format azure credentials #9

format azure credentials

format azure credentials #9

name: Build Image Factory VM
on:
push:
paths:
- ".github/workflows/packer-build-if-vm.yml"
- "images/packer/image-factory-vm"
workflow_dispatch:
jobs:
packer-build:
runs-on: ubuntu-latest
env:
AZURE_LOCATION: ${{ vars.AZURE_LOCATION }}
AZURE_RESOURCE_GROUP: ${{ vars.AZURE_RESOURCE_GROUP }}
AZURE_ACG: ${{ vars.AZURE_ACG }}
AZURE_CREDENTIALS: |
{
"clientId": "${{ secrets.AZURE_CLIENT_ID }}",
"clientSecret": "${{ secrets.AZURE_CLIENT_SECRET }}",
"subscriptionId": "${{ secrets.AZURE_SUBSCRIPTION_ID }}",
"tenantId": "${{ secrets.AZURE_TENANT_ID }}"
}
steps:
- name: Checkout Repository
uses: actions/checkout@v4
# - name: Template packer vars file
# uses: cuchi/[email protected]
# with:
# template: images/packer/image-factory-vm/values.auto.pkrvars.hcl.j2
# output_file: images/packer/image-factory-vm/values.auto.pkrvars.hcl
- name: Azure Login
uses: azure/login@v2
with:
creds: "${{ env.AZURE_CREDENTIALS }}"