User Profile
PinakiGhatak
Microsoft
Joined 6 years ago
User Widgets
Recent Discussions
Re: Template Specs Not Working as It Shows Error 'Template'
jianhuangbodun The following examples might help you. See below. # Author : Pinaki Ghatak Microsoft # Purpose : This is Github workflow to deploy Azure Template specs from ARM templates # Disclaimer : This is for demonstration and workshop purpose only. Please understand the logic, and verify and # test before implementing this in your environment. # Last update : 01-June-2021 name: 'PG-TemplateSpecs-CI-CD' on: # Triggers the workflow on push or pull request events but only for the main branch push: branches: [ main ] pull_request: branches: [ main ] # Allows you to run this workflow manually from the Actions tab workflow_dispatch: env: # Common variables WORKINGDIRECTORY: ${{ github.workspace }}/ # Dev environment variables AZURE_SUBSCRIPTION_ID: YourSubscription_d AZURE_RESOURCE_GROUP: 'Your-TemplateSpecs-RG' # Resource group for the Templatespecs #templatespecs info TEMPLATESPEC_NAME : CS-AzureFunctions TEMPLATESPEC_VER : 0.1 TEMPLATESPEC_DESC : 'Template for Azure Functions' TEMPLATE_SPEC_LOCATION: WestEurope jobs: VerifyAndDeploy: name: Verify And Deploy runs-on: windows-latest steps: - name: Checkout source code uses: actions/checkout@v2 # Login to Azure - name: Azure Login uses: azure/login@v1 with: creds: ${{ secrets.AZURE_CREDENTIALS }} enable-AzPSSession: true - name: Deploy Template Spec uses: azure/powershell@v1 with: azPSVersion: 'latest' inlinescript: | az ts create -g ${{ env.AZURE_RESOURCE_GROUP }} -n ${{env.TEMPLATESPEC_NAME}} --description '${{env.TEMPLATESPEC_DESC}}' -v ${{env.AZFUNCTION_TEMPLATESPEC_VER}} -f ./ARMTemplates/main.json -y1.8KViews0likes0Comments
Recent Blog Articles
No content to show