diff --git a/dashboard/gen-dashboard.py b/dashboard/gen-dashboard.py
index 29172d57..71ce789b 100755
--- a/dashboard/gen-dashboard.py
+++ b/dashboard/gen-dashboard.py
@@ -17,6 +17,15 @@
"website_pr_hosting",
]
+# Repos in which the main branch is called 'main':
+main_branch_repos = [
+ "microkit",
+ "rust-microkit-demo",
+ "rust-microkit-http-server-demo",
+ "rust-root-task-demo",
+ "rust-sel4",
+]
+
# Exclude workflows that are not available on default branch:
exlude_workflows = {
"website": ["action.yml", "main.yml", "bamboo-pr.yml"],
@@ -96,12 +105,12 @@ def print_header():
## Main Tests
-[![seL4Test](https://github.com/seL4/seL4/workflows/seL4Test/badge.svg?branch=master)](https://github.com/seL4/seL4/actions/workflows/sel4test-deploy.yml?query=branch%3Amaster)
-[![Proofs](https://github.com/seL4/l4v/workflows/Proofs/badge.svg?branch=master)](https://github.com/seL4/l4v/actions/workflows/proof-deploy.yml?query=branch%3Amaster)
-[![Proof Sync](https://github.com/seL4/seL4/workflows/Proof%20Sync/badge.svg?branch=master)](https://github.com/seL4/seL4/actions/workflows/preprocess-deploy.yml?query=branch%3Amaster)
-[![seL4Bench](https://github.com/seL4/sel4bench/workflows/seL4Bench/badge.svg?branch=master)](https://github.com/seL4/sel4bench/actions/workflows/sel4bench.yml?query=branch%3Amaster)
-[![CAmkES](https://github.com/seL4/camkes-tool/workflows/CAmkES/badge.svg?branch=master)](https://github.com/seL4/camkes-tool/actions/workflows/camkes-deploy.yml?query=branch%3Amaster)
-[![Camkes VM](https://github.com/seL4/camkes-vm-examples/workflows/Camkes%20VM/badge.svg?branch=master)](https://github.com/seL4/camkes-vm-examples/actions/workflows/camkes-vm-deploy.yml?query=branch%3Amaster)
+[![seL4Test](https://github.com/seL4/seL4/actions/workflows/sel4test-deploy.yml/badge.svg?branch=master)](https://github.com/seL4/seL4/actions/workflows/sel4test-deploy.yml?query=branch%3Amaster)
+[![Proofs](https://github.com/seL4/l4v/actions/workflows/proof-deploy.yml/badge.svg)](https://github.com/seL4/l4v/actions/workflows/proof-deploy.yml?query=branch%3Amaster)
+[![Proof Sync](https://github.com/seL4/seL4/actions/workflows/preprocess-deploy.yml/badge.svg?branch=master)](https://github.com/seL4/seL4/actions/workflows/preprocess-deploy.yml?query=branch%3Amaster)
+[![seL4Bench](https://github.com/seL4/sel4bench/actions/workflows/sel4bench.yml/badge.svg?branch=master)](https://github.com/seL4/sel4bench/actions/workflows/sel4bench.yml?query=branch%3Amaster)
+[![CAmkES](https://github.com/seL4/camkes-tool/actions/workflows/camkes-deploy.yml/badge.svg?branch=master)](https://github.com/seL4/camkes-tool/actions/workflows/camkes-deploy.yml?query=branch%3Amaster)
+[![CAmkES VM](https://github.com/seL4/camkes-vm-examples/actions/workflows/camkes-vm-deploy.yml/badge.svg?branch=master)](https://github.com/seL4/camkes-vm-examples/actions/workflows/camkes-vm-deploy.yml?query=branch%3Amaster)
-----
@@ -117,10 +126,12 @@ def print_repo(repo_name):
def print_workflow(repo, workflow):
'''Print a single workflow.'''
+ branch_name = "main" if repo in main_branch_repos else "master"
+ workflow_name = os.path.basename(workflow.path)
base_url = f"{org_url}/{repo}/actions/workflows"
- action_url = f"{base_url}/{os.path.basename(workflow.path)}?query=branch%3Amaster"
- print(f"[![{workflow.name}]({workflow.badge_url}"
- f"?branch=master)]({action_url})")
+ badge_url = f"{base_url}/{workflow_name}/badge.svg?branch={branch_name}"
+ action_url = f"{base_url}/{workflow_name}?query=branch%3A{branch_name}"
+ print(f"[![{workflow.name}]({badge_url})]({action_url})")
def print_badges(workflows: dict):