{"id":13775205,"url":"https://github.com/Azure4DevOps/check-azure-bicep","last_synced_at":"2025-05-11T07:32:10.729Z","repository":{"id":45386329,"uuid":"512793578","full_name":"Azure4DevOps/check-azure-bicep","owner":"Azure4DevOps","description":"Pre-commit hooks for Azure Bicep validation, with built-in support for GitHub Workflows, Azure Pipelines, and more! Enabling shift left approach for Azure Bicep infrastructure as code.","archived":false,"fork":false,"pushed_at":"2024-11-06T08:48:30.000Z","size":194,"stargazers_count":25,"open_issues_count":3,"forks_count":3,"subscribers_count":1,"default_branch":"master","last_synced_at":"2024-11-06T09:31:27.371Z","etag":null,"topics":["azure","azure-devops","bicep","cli","git","github-actions","pre-commit","shift-left"],"latest_commit_sha":null,"homepage":"","language":"Bicep","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Azure4DevOps.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":".github/CODEOWNERS","security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2022-07-11T14:38:09.000Z","updated_at":"2024-11-06T08:48:27.000Z","dependencies_parsed_at":"2024-02-19T20:42:06.413Z","dependency_job_id":"28c8a4da-ec4c-4d75-80b6-57ad8ddde8a9","html_url":"https://github.com/Azure4DevOps/check-azure-bicep","commit_stats":null,"previous_names":[],"tags_count":27,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Azure4DevOps%2Fcheck-azure-bicep","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Azure4DevOps%2Fcheck-azure-bicep/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Azure4DevOps%2Fcheck-azure-bicep/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Azure4DevOps%2Fcheck-azure-bicep/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Azure4DevOps","download_url":"https://codeload.github.com/Azure4DevOps/check-azure-bicep/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":225027354,"owners_count":17409417,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["azure","azure-devops","bicep","cli","git","github-actions","pre-commit","shift-left"],"created_at":"2024-08-03T17:01:35.270Z","updated_at":"2024-11-17T10:30:44.272Z","avatar_url":"https://github.com/Azure4DevOps.png","language":"Bicep","funding_links":[],"categories":["Community"],"sub_categories":["Community Tools"],"readme":"[![Build Status](https://dev.azure.com/Azure4DevOps/Azure4DevOps/_apis/build/status/Azure4DevOps.check-azure-bicep-ci?branchName=master)](https://dev.azure.com/Azure4DevOps/Azure4DevOps/_build/latest?definitionId=2\u0026branchName=master)\n[![CI](https://github.com/Azure4DevOps/check-azure-bicep/actions/workflows/github-action-ci.yml/badge.svg)](https://github.com/Azure4DevOps/check-azure-bicep/actions/workflows/github-action-ci.yml)\n![GitHub release (latest SemVer)](https://img.shields.io/github/v/release/Azure4DevOps/check-azure-bicep)\n![GitHub release (latest by date including pre-releases)](https://img.shields.io/github/v/release/Azure4DevOps/check-azure-bicep?include_prereleases)\n[![pre-commit][pre-commit-image]][pre-commit-link]\n\n[pre-commit-image]: https://img.shields.io/badge/pre--commit-enabled-brightgreen?logo=pre-commit\u0026style=flat-square\n[pre-commit-link]: https://github.com/pre-commit/pre-commit\n\n# check-azure-bicep\n\n[pre-commit](https://pre-commit.com/) hooks for [Azure Bicep](https://github.com/Azure/bicep) validation,\nwith built-in support for GitHub Workflows, Azure Pipelines, and more! Enabling [shift left](https://devopedia.org/shift-left) approach for [Azure Bicep](https://github.com/Azure/bicep) infrastructure as code.\n\n## About\n\nThis repository provide one hook to use with [pre-commit](https://pre-commit.com/) that validate bicep files: it will call `az bicep build`.\n\nIt requires the `az bicep` toolchain installed, and uses [`az bicep`](https://github.com/Azure/bicep) under the hood.\n\n## Demo\n\nExample usage of `pre-commit run --all-files` and\n`git commit` after hook innstall in git repository `pre-commit install`\n\n![alt text](https://raw.githubusercontent.com/Azure4DevOps/check-azure-bicep.example/master/example.gif)\n\n### Azure Bicep Install\n\nTo install `az bicep` use [install](https://docs.microsoft.com/pl-pl/azure/azure-resource-manager/bicep/install) or [install](https://github.com/Azure/bicep) or `az bicep install` for Azure cli.\n\n### pre-commit Install\n\nBefore you can run hooks, you need to have the pre-commit package manager installed. Using pip:\n\n```pip\n# install using pip\npip install pre-commit\n\n# check if working - expected print with version like `pre-commit 3.2.2`\npre-commit --version\n\n# setup the git repo for hooks\npre-commit install\n\n# periodically run updates to your pre-commit config to make sure you always have the latest version of the hooks\npre-commit autoupdate\n```\n\n## Example usage\n\nAdd a snippet to your `.pre-commit-config.yaml` file in root of repository.\n\n```yaml\n- repo: https://github.com/Azure4DevOps/check-azure-bicep\n  rev: v0.2.1 # ${LATEST_SHA_OR_VERSION}\n  hooks:\n    - id: check-azure-bicep\n```\n\n## Example local run\n\nrun `pre-commit install` to set up the git hook scripts in your git repository # scan all modyfied miles before making commint (git hooks)\nor\nrun `pre-commit run --all-files` # scanning all files\n\nat result all bicep files will or modified will be validated doing `az bicep build`\n\n## Example Azure Pipelines usage `azure-pipelines-ci.yml`\n\n```yaml\npool:\n  vmImage: \"ubuntu-latest\"\nsteps:\n  - script: |\n      pip install pre-commit\n      pre-commit --version\n      pre-commit run --all-files\n    displayName: Execute pre-commit\n```\n\n## Example Github Workflow usage `github-action-ci.yml`\n\n```yaml\nbuild:\n  runs-on: ubuntu-latest\n  steps:\n    - name: Execute pre-commit\n      run: |\n        pip install pre-commit\n        pre-commit --version\n        pre-commit run --all-files\n```\n\n## 📄 License\n\nThis project is distributed under the terms of the [MIT](https://opensource.org/licenses/MIT) license.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FAzure4DevOps%2Fcheck-azure-bicep","html_url":"https://awesome.ecosyste.ms/projects/github.com%2FAzure4DevOps%2Fcheck-azure-bicep","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FAzure4DevOps%2Fcheck-azure-bicep/lists"}