The github action fails when using github action azure/arm-deploy to deploy a bicep template on a github hosted agent because bicep writes an output to stderr indicating there is a new version. The action fails as soon as something was send to stderr.
I have seen this behavior a couple of days back when bicep was upgraded from v0.13.1 to v0.14.6. Today I encounter the same when upgrading to v0.14.46. The only thing I was able to do at that time was waiting until the latest version of bicep was available (luckily it lasted less then a day before the hosted-agents were updated with the latest bicep version).
While trying more, I noticed that some action pipelines succeeded. This was probably because agents were getting updated and I was just lucky to have an agent with the latest bicep version.
Is there a way I can circumvent this? Can I deploy a bicep template even if the github hosted agent is not on the latest bicep version?
Following has been tried:
I added a step in the pipeline to deploy a specific bicep version. This didn't seem to work; the bicep version available on the hosted agent was taken (making multiple runs resulted in a random Bicep version, depending on what's available on the agent).
Setting failOnStdErr: false (property on azure/arm-deploy) had no effect and is not prefered because I want to be informed if a bicep deployment failed or not.