Skip to content

Commit

Permalink
feat: Add --with-source flag to bicep publish command (#908)
Browse files Browse the repository at this point in the history
  • Loading branch information
jtracey93 authored Feb 17, 2024
1 parent 651de62 commit 363a669
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 3 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/publish-module.yml
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ jobs:
bicep --version
- name: Publish module
run: bicep publish "modules/${{ steps.parse-tag.outputs.module_path }}/main.json" --target "br:${{ secrets.PUBLISH_REGISTRY_SERVER }}/public/bicep/${{ steps.parse-tag.outputs.module_path }}:${{ steps.parse-tag.outputs.version }}" --documentationUri "${{ steps.parse-tag.outputs.documentation_uri }}" --force
run: bicep publish "modules/${{ steps.parse-tag.outputs.module_path }}/main.json" --target "br:${{ secrets.PUBLISH_REGISTRY_SERVER }}/public/bicep/${{ steps.parse-tag.outputs.module_path }}:${{ steps.parse-tag.outputs.version }}" --documentationUri "${{ steps.parse-tag.outputs.documentation_uri }}" --with-source --force

- name: Validate publish
run: |
Expand Down
7 changes: 5 additions & 2 deletions avm/bicepconfig.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,10 @@
// This is a Bicep configuration file. It can be used to control how Bicep operates and to customize validation settings for the Bicep linter. The linter uses these settings when evaluating your Bicep files for best practices.
// For further information, please refer to the official documentation at: https://learn.microsoft.com/en-us/azure/azure-resource-manager/bicep/bicep-config
{
"analyzers": {
"experimentalFeaturesEnabled": {
"publishSource": true
},
"analyzers": {
"core": {
"rules": {
"no-deployments-resources": {
Expand All @@ -10,4 +13,4 @@
}
}
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,7 @@ function Publish-ModuleFromTagToPBR {
$moduleJsonFilePath
'--target', ("br:{0}/public/bicep/{1}:{2}" -f $plainPublicRegistryServer, $moduleRelativeFolderPath, $targetVersion)
'--documentationUri', $documentationUri
'--with-source'
'--force'
)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -97,6 +97,7 @@ function Publish-ModuleFromPathToPBR {
$moduleJsonFilePath
'--target', ("br:{0}/public/bicep/{1}:{2}" -f $plainPublicRegistryServer, $publishedModuleName, $targetVersion)
'--documentationUri', $documentationUri
'--with-source'
'--force'
)
# TODO move to its own task to show that as skipped if no file qualifies for new version
Expand Down

0 comments on commit 363a669

Please sign in to comment.