When using Bicep expansion using the ps-rule GitHub Action installing bicep CLI is a challenge.
The PSRule docker container is alpine and cannot access bicep CLI easily if it is installed via az CLI.
Currently a workaround by installing it into the docker container can be done by adding the following custom code, but this is not ideal.
#
# Bicep installation for PSRule
#
# Note:
# This content is set in .ps-rule/Bicep.Rule.ps1
# Install the latest Bicep CLI binary for alpine
Invoke-WebRequest -Uri 'https://github.com/Azure/bicep/releases/latest/download/bicep-linux-musl-x64' -OutFile $Env:GITHUB_WORKSPACE/bicep.bin
# Set executable
chmod +x $Env:GITHUB_WORKSPACE/bicep.bin
# Copy to PATH environment
Move-Item $Env:GITHUB_WORKSPACE/bicep.bin /usr/local/bin/bicep
When using Bicep expansion using the
ps-rule
GitHub Action installing bicep CLI is a challenge.The PSRule docker container is alpine and cannot access bicep CLI easily if it is installed via az CLI.
Currently a workaround by installing it into the docker container can be done by adding the following custom code, but this is not ideal.