Bicep and GitHubActions #2759
Answered
by
pattisanta
pattisanta
asked this question in
Q&A
Replies: 3 comments 3 replies
-
When you deploy your entry point file (like the one above), it will automatically traverse all the files you reference in your module instantiations. So assuming the above file is called name: bicep build and deploy
on: push
env:
# Common variables
AZURE_RESOURCE_GROUP: 'myResourceGroupName'
jobs:
bicep-build-and-deploy:
name: bicep build and deploy
runs-on: ubuntu-latest
steps:
# Checks out a copy of your repository on the ubuntu-latest machine
- name: Checkout code
uses: actions/checkout@v2
# Login to Azure
- name: Azure Login
uses: azure/login@v1
with:
creds: ${{ secrets.AZURE_CREDENTIALS }}
# Deploy template
- name: Deploy template
uses: azure/CLI@v1
with:
inlineScript: |
az account show
az deployment group create -f ./main.bicep -g ${{ env.AZURE_RESOURCE_GROUP }} Here is a doc on the azure login task, which explains how to set up credentials |
Beta Was this translation helpful? Give feedback.
1 reply
-
Hi Ben,
Yes. I am doing subscription deployment. I have tested from my VsCode deploying a resource group, rbac roles and budget all works great. However, when I run it through github actions only the RG and budget deploys but not the rbac. Still trying figure out why in vscode all deploys perfectly but not in github actions. Do you have any recommendations?
Patti
From: Ben Wilkinson ***@***.***>
Sent: Wednesday, June 9, 2021 7:46 PM
To: Azure/bicep ***@***.***>
Cc: Santacroce, Patti ***@***.***>; Mention ***@***.***>
Subject: Re: [Azure/bicep] Bicep and GitHubActions (#2759)
@pattisanta<https://github.com/pattisanta> how did you go with your GitHub workflow, did you manage to get things working okay ?
One thing I noticed is that you are doing a subscription deployment, so hopefully you got that figured out.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub<#2759 (reply in thread)>, or unsubscribe<https://github.com/notifications/unsubscribe-auth/AECGXAG5TZEJXH2E524NUSTTR74LXANCNFSM45HHG2PA>.
[External Email: This message has originated from an external source. Please use proper judgment and caution when opening attachments, clicking links, or responding to this email.]
|
Beta Was this translation helpful? Give feedback.
1 reply
-
Hi Ben,
It looks something in my bicep file was the problem. I just ran through github actions it ran successfully.
Thanks for following up,
Patti
From: Ben Wilkinson ***@***.***>
Sent: Thursday, June 10, 2021 11:53 AM
To: Azure/bicep ***@***.***>
Cc: Santacroce, Patti ***@***.***>; Mention ***@***.***>
Subject: Re: [Azure/bicep] Bicep and GitHubActions (#2759)
Are you able to share the Workflow/action settings that you are using to deploy?
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub<#2759 (reply in thread)>, or unsubscribe<https://github.com/notifications/unsubscribe-auth/AECGXAH3QP3I5RZHDKHGE4DTSDNUJANCNFSM45HHG2PA>.
[External Email: This message has originated from an external source. Please use proper judgment and caution when opening attachments, clicking links, or responding to this email.]
|
Beta Was this translation helpful? Give feedback.
1 reply
Answer selected by
pattisanta
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hi All,
I am pretty new to the working with github actions. I am wondering if there is a way that I can deploy a bicep file with modules already in the main file. I have a bicep that will deploy the resource group along with a few modules. for example it looks like something like this
maybe someone can point to documentation that I haven't come across yet.
Thanks,
Patti
Beta Was this translation helpful? Give feedback.
All reactions