From 8abdc0df154ce8917e3ecd7b6303dca0383a4fc0 Mon Sep 17 00:00:00 2001 From: Pinaki Ghatak Date: Tue, 16 Mar 2021 13:13:30 +0100 Subject: [PATCH] curl download file extension added --- docs/cicd-with-bicep.md | 18 +++++++++++------- 1 file changed, 11 insertions(+), 7 deletions(-) diff --git a/docs/cicd-with-bicep.md b/docs/cicd-with-bicep.md index 0d4033fb52c..c8123b45d0d 100644 --- a/docs/cicd-with-bicep.md +++ b/docs/cicd-with-bicep.md @@ -18,6 +18,10 @@ name: bicep build and deploy on: push +env: + # Common variables + AZURE_RESOURCE_GROUP: 'myResourceGroupName' + jobs: bicep-build-and-deploy: name: bicep build and deploy @@ -28,12 +32,12 @@ jobs: - name: Checkout code uses: actions/checkout@v2 - # Install the latest release of the bicep CLI - - name: Install bicep CLI + # Install the latest release of the bicep CLI binaries + - name: Install bicep CLI Binaries run: | - curl -Lo bicep https://github.com/Azure/bicep/releases/latest/download/bicep-linux-x64 - chmod +x ./bicep - sudo mv ./bicep /usr/local/bin/bicep + curl -Lo bicep.bin https://github.com/Azure/bicep/releases/latest/download/bicep-linux-x64 + chmod +x ./bicep.bin + sudo mv ./bicep.bin /usr/local/bin/bicep bicep --help # Transpile bicep file into ARM template @@ -56,7 +60,7 @@ jobs: with: inlineScript: | az account show - az deployment group what-if -f ./main.json -p ./parameters.json -g my-rg + az deployment group what-if -f ./main.json -p ./parameters.json -g ${{ env.AZURE_RESOURCE_GROUP }} # You may want a human approval in between the what-if step # and the deploy step to evaluate output before deployment @@ -67,7 +71,7 @@ jobs: with: inlineScript: | az account show - az deployment group create -f ./main.json -g my-rg + az deployment group create -f ./main.json -g ${{ env.AZURE_RESOURCE_GROUP }} ``` Instead of installing the Bicep CLI manually, you may instead want to use the [community-maintained github action](https://github.com/marketplace/actions/bicep-build) from [@justinyoo](https://github.com/justinyoo) that can run `bicep build` on your behalf.