File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 88#>
99param (
1010[uri ]
11- $BuildTimeHistoryUrl = " https://4kb.powershellweb.com/history.json"
11+ $BuildTimeHistoryUrl = " https://4kb.powershellweb.com/history.json" ,
12+
13+ [string ]$GitHubRepository = $env: GITHUB_REPOSITORY
1214)
1315
1416# Make sure we're in the right place.
@@ -161,13 +163,15 @@ $([Web.HttpUtility]::HtmlAttributeEncode($descriptionMessage))
161163 " <h1>4kb Markdown Files Benchmark</h1>"
162164 " <h2>Time to build 4096 markdown files</h2>"
163165 " <h3>Last built at $ ( [DateTime ]::UtcNow.ToString(" s" )) running @ $cpuSpeed Mhz</h3>"
164- " <h4><a href='https://github.com/PowerShellWeb/4kbMarkdownFiles/'><button>Github Repo</button></a></h4>"
165-
166- " <h4>"
167- " [](https://github.com/PowerShellWeb/4kbMarkdownFiles/actions/workflows/deploy.yml)" |
168- ConvertFrom-Markdown |
169- Select-Object - ExpandProperty Html
166+ if ($GitHubRepository ) {
167+ " <h4><a href='https://github.com/$GitHubRepository /'><button>Github Repo</button></a></h4>"
168+
169+ " <h4>"
170+ " <a href='https://github.com/$GitHubRepository /actions/workflows/deploy.yml'>"
171+ " <img src='https://github.com/$GitHubRepository /actions/workflows/deploy.yml/badge.svg'></img>"
172+ " </a>"
170173 " </h4>"
174+ }
171175
172176 # Make a really basic heatmap (yes, this is that easy)
173177 # We want the fastest item to be the most green, so start by getting its relative speed
You can’t perform that action at this time.
0 commit comments