Skip to content

Commit

Permalink
Move module table to a GitHub page (#311)
Browse files Browse the repository at this point in the history
* Add a workflow to generate module index

* Add permission

* Update readme

* Use aka link

* Update prettierignore

* Ignore index.md
  • Loading branch information
shenglol authored Apr 7, 2023
1 parent c9f2145 commit 595b38d
Show file tree
Hide file tree
Showing 16 changed files with 399 additions and 122 deletions.
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: BRM / Automaticly Triggered BRM Generation
name: On push run brm generate # fork only, optional

on:
push:
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: BRM / Automaticly Format Workflow Files
name: On push format workflow files # fork only, optional

on:
push:
Expand Down
106 changes: 106 additions & 0 deletions .github/workflows/publish-module-index.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,106 @@
name: Publish module index
on:
workflow_dispatch:

permissions:
id-token: write
pages: write
contents: read

# Allow only one concurrent deployment, skipping runs queued between the run in-progress and latest queued.
# However, do NOT cancel in-progress runs as we want to allow these production deployments to complete.
concurrency:
group: "pages"
cancel-in-progress: false

jobs:
upload-index-data:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v2

- name: Install packages
run: npm ci

- name: Generate moduleIndex.json
uses: actions/github-script@v6
with:
script: |
const script = require("./scripts/github-actions/generate-module-index-data.js")
await script({ require, core })
- name: Upload artifact
uses: actions/upload-artifact@v3
with:
name: moduleIndex.json
path: moduleIndex.json

- name: Log in to Azure
uses: azure/login@v1
with:
client-id: ${{ secrets.PUBLISH_CLIENT_ID }}
tenant-id: ${{ secrets.PUBLISH_TENANT_ID }}
subscription-id: ${{ secrets.PUBLISH_SUBSCRIPTION_ID }}

- name: Upload to blob storage
uses: azure/CLI@v1
with:
inlineScript: |
az storage blob upload --account-name biceplivedatasaprod --container-name bicep-cdn-live-data-container --name module-index --file moduleIndex.json --auth-mode login --overwrite
build-index-page:
runs-on: ubuntu-latest
needs: upload-index-data
steps:
- name: Checkout repository
uses: actions/checkout@v2

- name: Install packages
run: npm ci

- name: Download artifact
uses: actions/download-artifact@v3
with:
name: moduleIndex.json

- name: Generate index.md
uses: actions/github-script@v6
with:
script: |
const script = require("./scripts/github-actions/generate-module-index-md.js")
await script({ require, github, context, core })
- name: Setup Ruby
uses: ruby/setup-ruby@v1
with:
ruby-version: "3.1"
bundler-cache: true # runs 'bundle install' and caches installed gems automatically
cache-version: 0 # Increment this number if you need to re-download cached gems
working-directory: ./docs/jekyll

- name: Setup Pages
id: pages
uses: actions/configure-pages@v2

- name: Build with Jekyll
working-directory: ./docs/jekyll
run: bundle exec jekyll build --baseurl "${{ steps.pages.outputs.base_path }}" # Outputs to the './_site' directory by default
env:
JEKYLL_ENV: production

- name: Upload Pages artifact
uses: actions/upload-pages-artifact@v1
with:
path: ./docs/jekyll/_site

deploy-index-page:
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
runs-on: ubuntu-latest
needs: build-index-page
steps:
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v2
22 changes: 0 additions & 22 deletions .github/workflows/refresh-module-table.yml

This file was deleted.

44 changes: 0 additions & 44 deletions .github/workflows/upload-modules-metadata.yml

This file was deleted.

1 change: 1 addition & 0 deletions .prettierignore
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
modules/
package-lock.json
docs/jekyll
2 changes: 0 additions & 2 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
{
"editor.formatOnSave": true,
"editor.formatOnPaste": true,
"files.trimTrailingWhitespace": true,
"files.autoSave": "onFocusChange",
"git.autofetch": true,
Expand Down
29 changes: 2 additions & 27 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,34 +2,9 @@

This repo contains the source code of all currently available Bicep modules in the Bicep public module registry.

## Modules
## Available Modules

Below is a table containing all published modules. Each version badge shows the latest version of the corresponding module. You may click on a version badge to check all available versions for a module.

<!-- Begin Module Table -->

| Module | Version | Docs |
| :----------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------: | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------: |
| `app/dapr-containerapp` | <a href="https://mcr.microsoft.com/v2/bicep/app/dapr-containerapp/tags/list"><image src="https://img.shields.io/badge/mcr-1.0.2-blue"></a> | [🦾 Code](https://github.com/Azure/bicep-registry-modules/tree/main/modules/app/dapr-containerapp/main.bicep)[📃 Readme](https://github.com/Azure/bicep-registry-modules/tree/main/modules/app/dapr-containerapp/README.md) |
| `app/dapr-containerapps-environment` | <a href="https://mcr.microsoft.com/v2/bicep/app/dapr-containerapps-environment/tags/list"><image src="https://img.shields.io/badge/mcr-1.2.2-blue"></a> | [🦾 Code](https://github.com/Azure/bicep-registry-modules/tree/main/modules/app/dapr-containerapps-environment/main.bicep)[📃 Readme](https://github.com/Azure/bicep-registry-modules/tree/main/modules/app/dapr-containerapps-environment/README.md) |
| `azure-gaming/game-dev-vm` | <a href="https://mcr.microsoft.com/v2/bicep/azure-gaming/game-dev-vm/tags/list"><image src="https://img.shields.io/badge/mcr-1.0.2-blue"></a> | [🦾 Code](https://github.com/Azure/bicep-registry-modules/tree/main/modules/azure-gaming/game-dev-vm/main.bicep)[📃 Readme](https://github.com/Azure/bicep-registry-modules/tree/main/modules/azure-gaming/game-dev-vm/README.md) |
| `azure-gaming/game-dev-vmss` | <a href="https://mcr.microsoft.com/v2/bicep/azure-gaming/game-dev-vmss/tags/list"><image src="https://img.shields.io/badge/mcr-1.1.1-blue"></a> | [🦾 Code](https://github.com/Azure/bicep-registry-modules/tree/main/modules/azure-gaming/game-dev-vmss/main.bicep)[📃 Readme](https://github.com/Azure/bicep-registry-modules/tree/main/modules/azure-gaming/game-dev-vmss/README.md) |
| `compute/availability-set` | <a href="https://mcr.microsoft.com/v2/bicep/compute/availability-set/tags/list"><image src="https://img.shields.io/badge/mcr-1.0.1-blue"></a> | [🦾 Code](https://github.com/Azure/bicep-registry-modules/tree/main/modules/compute/availability-set/main.bicep)[📃 Readme](https://github.com/Azure/bicep-registry-modules/tree/main/modules/compute/availability-set/README.md) |
| `compute/container-registry` | <a href="https://mcr.microsoft.com/v2/bicep/compute/container-registry/tags/list"><image src="https://img.shields.io/badge/mcr-1.0.1-blue"></a> | [🦾 Code](https://github.com/Azure/bicep-registry-modules/tree/main/modules/compute/container-registry/main.bicep)[📃 Readme](https://github.com/Azure/bicep-registry-modules/tree/main/modules/compute/container-registry/README.md) |
| `compute/custom-image-vmss` | <a href="https://mcr.microsoft.com/v2/bicep/compute/custom-image-vmss/tags/list"><image src="https://img.shields.io/badge/mcr-1.0.1-blue"></a> | [🦾 Code](https://github.com/Azure/bicep-registry-modules/tree/main/modules/compute/custom-image-vmss/main.bicep)[📃 Readme](https://github.com/Azure/bicep-registry-modules/tree/main/modules/compute/custom-image-vmss/README.md) |
| `deployment-scripts/aks-run-command` | <a href="https://mcr.microsoft.com/v2/bicep/deployment-scripts/aks-run-command/tags/list"><image src="https://img.shields.io/badge/mcr-1.0.3-blue"></a> | [🦾 Code](https://github.com/Azure/bicep-registry-modules/tree/main/modules/deployment-scripts/aks-run-command/main.bicep)[📃 Readme](https://github.com/Azure/bicep-registry-modules/tree/main/modules/deployment-scripts/aks-run-command/README.md) |
| `deployment-scripts/aks-run-helm` | <a href="https://mcr.microsoft.com/v2/bicep/deployment-scripts/aks-run-helm/tags/list"><image src="https://img.shields.io/badge/mcr-2.0.1-blue"></a> | [🦾 Code](https://github.com/Azure/bicep-registry-modules/tree/main/modules/deployment-scripts/aks-run-helm/main.bicep)[📃 Readme](https://github.com/Azure/bicep-registry-modules/tree/main/modules/deployment-scripts/aks-run-helm/README.md) |
| `deployment-scripts/build-acr` | <a href="https://mcr.microsoft.com/v2/bicep/deployment-scripts/build-acr/tags/list"><image src="https://img.shields.io/badge/mcr-2.0.1-blue"></a> | [🦾 Code](https://github.com/Azure/bicep-registry-modules/tree/main/modules/deployment-scripts/build-acr/main.bicep)[📃 Readme](https://github.com/Azure/bicep-registry-modules/tree/main/modules/deployment-scripts/build-acr/README.md) |
| `deployment-scripts/create-kv-certificate` | <a href="https://mcr.microsoft.com/v2/bicep/deployment-scripts/create-kv-certificate/tags/list"><image src="https://img.shields.io/badge/mcr-3.0.2-blue"></a> | [🦾 Code](https://github.com/Azure/bicep-registry-modules/tree/main/modules/deployment-scripts/create-kv-certificate/main.bicep)[📃 Readme](https://github.com/Azure/bicep-registry-modules/tree/main/modules/deployment-scripts/create-kv-certificate/README.md) |
| `deployment-scripts/import-acr` | <a href="https://mcr.microsoft.com/v2/bicep/deployment-scripts/import-acr/tags/list"><image src="https://img.shields.io/badge/mcr-3.0.1-blue"></a> | [🦾 Code](https://github.com/Azure/bicep-registry-modules/tree/main/modules/deployment-scripts/import-acr/main.bicep)[📃 Readme](https://github.com/Azure/bicep-registry-modules/tree/main/modules/deployment-scripts/import-acr/README.md) |
| `deployment-scripts/wait` | <a href="https://mcr.microsoft.com/v2/bicep/deployment-scripts/wait/tags/list"><image src="https://img.shields.io/badge/mcr-1.0.1-blue"></a> | [🦾 Code](https://github.com/Azure/bicep-registry-modules/tree/main/modules/deployment-scripts/wait/main.bicep)[📃 Readme](https://github.com/Azure/bicep-registry-modules/tree/main/modules/deployment-scripts/wait/README.md) |
| `lz/sub-vending` | <a href="https://mcr.microsoft.com/v2/bicep/lz/sub-vending/tags/list"><image src="https://img.shields.io/badge/mcr-1.2.2-blue"></a> | [🦾 Code](https://github.com/Azure/bicep-registry-modules/tree/main/modules/lz/sub-vending/main.bicep)[📃 Readme](https://github.com/Azure/bicep-registry-modules/tree/main/modules/lz/sub-vending/README.md) |
| `network/virtual-network` | <a href="https://mcr.microsoft.com/v2/bicep/network/virtual-network/tags/list"><image src="https://img.shields.io/badge/mcr-1.1.2-blue"></a> | [🦾 Code](https://github.com/Azure/bicep-registry-modules/tree/main/modules/network/virtual-network/main.bicep)[📃 Readme](https://github.com/Azure/bicep-registry-modules/tree/main/modules/network/virtual-network/README.md) |
| `samples/array-loop` | <a href="https://mcr.microsoft.com/v2/bicep/samples/array-loop/tags/list"><image src="https://img.shields.io/badge/mcr-1.0.1-blue"></a> | [🦾 Code](https://github.com/Azure/bicep-registry-modules/tree/main/modules/samples/array-loop/main.bicep)[📃 Readme](https://github.com/Azure/bicep-registry-modules/tree/main/modules/samples/array-loop/README.md) |
| `samples/hello-world` | <a href="https://mcr.microsoft.com/v2/bicep/samples/hello-world/tags/list"><image src="https://img.shields.io/badge/mcr-1.0.2-blue"></a> | [🦾 Code](https://github.com/Azure/bicep-registry-modules/tree/main/modules/samples/hello-world/main.bicep)[📃 Readme](https://github.com/Azure/bicep-registry-modules/tree/main/modules/samples/hello-world/README.md) |
| `storage/storage-account` | <a href="https://mcr.microsoft.com/v2/bicep/storage/storage-account/tags/list"><image src="https://img.shields.io/badge/mcr-0.0.1-blue"></a> | [🦾 Code](https://github.com/Azure/bicep-registry-modules/tree/main/modules/storage/storage-account/main.bicep)[📃 Readme](https://github.com/Azure/bicep-registry-modules/tree/main/modules/storage/storage-account/README.md) |

<!-- End Module Table -->
To view available modules and their versions, go to Bicep Registry Module Index ([https://aka.ms/br-module-index](https://aka.ms/br-module-index)).

## Contributing

Expand Down
12 changes: 12 additions & 0 deletions docs/jekyll/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
# Copied from https://github.com/github/gitignore/blob/main/Jekyll.gitignore
# Ignore metadata generated by Jekyll
_site/
.sass-cache/
.jekyll-cache/
.jekyll-metadata

# Ignore folders generated by Bundler
.bundle/
vendor/

index.md
11 changes: 11 additions & 0 deletions docs/jekyll/Gemfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
source 'https://rubygems.org'

gem "jekyll", "~> 4.3" # installed by `gem jekyll`
# gem "webrick" # required when using Ruby >= 3 and Jekyll <= 4.2.2

gem "just-the-docs", "0.4.2" # pinned to the current release
# gem "just-the-docs" # always download the latest release

group :jekyll_plugins do
gem 'jekyll-remote-include', :github => 'netrics/jekyll-remote-include'
end
88 changes: 88 additions & 0 deletions docs/jekyll/Gemfile.lock
Original file line number Diff line number Diff line change
@@ -0,0 +1,88 @@
GIT
remote: https://github.com/netrics/jekyll-remote-include.git
revision: 39ae1a1744c8837d5ee64b11c5f982304ea940e5
specs:
jekyll-remote-include (1.0.2)

GEM
remote: https://rubygems.org/
specs:
addressable (2.8.1)
public_suffix (>= 2.0.2, < 6.0)
colorator (1.1.0)
concurrent-ruby (1.1.10)
em-websocket (0.5.3)
eventmachine (>= 0.12.9)
http_parser.rb (~> 0)
eventmachine (1.2.7)
ffi (1.15.5)
ffi (1.15.5-x64-mingw-ucrt)
forwardable-extended (2.6.0)
http_parser.rb (0.8.0)
i18n (1.12.0)
concurrent-ruby (~> 1.0)
jekyll (4.3.0)
addressable (~> 2.4)
colorator (~> 1.0)
em-websocket (~> 0.5)
i18n (~> 1.0)
jekyll-sass-converter (>= 2.0, < 4.0)
jekyll-watch (~> 2.0)
kramdown (~> 2.3, >= 2.3.1)
kramdown-parser-gfm (~> 1.0)
liquid (~> 4.0)
mercenary (>= 0.3.6, < 0.5)
pathutil (~> 0.9)
rouge (>= 3.0, < 5.0)
safe_yaml (~> 1.0)
terminal-table (>= 1.8, < 4.0)
webrick (~> 1.7)
jekyll-sass-converter (2.2.0)
sassc (> 2.0.1, < 3.0)
jekyll-seo-tag (2.8.0)
jekyll (>= 3.8, < 5.0)
jekyll-watch (2.2.1)
listen (~> 3.0)
just-the-docs (0.4.2)
jekyll (>= 3.8.5)
jekyll-seo-tag (>= 2.0)
rake (>= 12.3.1)
kramdown (2.4.0)
rexml
kramdown-parser-gfm (1.1.0)
kramdown (~> 2.0)
liquid (4.0.3)
listen (3.7.1)
rb-fsevent (~> 0.10, >= 0.10.3)
rb-inotify (~> 0.9, >= 0.9.10)
mercenary (0.4.0)
pathutil (0.16.2)
forwardable-extended (~> 2.6)
public_suffix (5.0.0)
rake (13.0.6)
rb-fsevent (0.11.2)
rb-inotify (0.10.1)
ffi (~> 1.0)
rexml (3.2.5)
rouge (4.0.0)
safe_yaml (1.0.5)
sassc (2.4.0)
ffi (~> 1.9)
terminal-table (3.0.2)
unicode-display_width (>= 1.1.1, < 3)
unicode-display_width (2.3.0)
webrick (1.7.0)

PLATFORMS
arm64-darwin-21
x64-mingw-ucrt
x86_64-darwin-19
x86_64-linux

DEPENDENCIES
jekyll (~> 4.3)
jekyll-remote-include!
just-the-docs (= 0.4.2)

BUNDLED WITH
2.3.9
9 changes: 9 additions & 0 deletions docs/jekyll/_config.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
title: Bicep Registry
theme: just-the-docs

url: https://just-the-docs.github.io

aux_links:
Bicep Registry Repository: https://github.com/azure/bicep-registry-modules

favicon_ico: /assets/images/bicep.ico
Binary file added docs/jekyll/assets/images/bicep.ico
Binary file not shown.
Loading

0 comments on commit 595b38d

Please sign in to comment.