Skip to content

Commit 9f46db3

Browse files
committed
Update action
1 parent 87cb09a commit 9f46db3

File tree

3 files changed

+3
-2
lines changed

3 files changed

+3
-2
lines changed

.github/workflows/main.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ jobs:
1111
strategy:
1212
matrix:
1313
files: [ '**/*.bicep', 'sample1.bicep sample2.bicep biceps/sample3.bicep biceps/sample4.bicep' ]
14-
version: [ 'latest', 'v0.3.255', 'v0.2.x' ]
14+
version: [ '', 'latest', 'v0.3.255', 'v0.2.x' ]
1515

1616
steps:
1717
- name: Checkout the repo

action.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ inputs:
1313
version:
1414
description: Version of the bicep CLI. It can be the exact version (eg. `v0.3.255`), wildcard (eg. `v0.3.x`) or `latest`. If omitted, `latest` is set as default.
1515
required: false
16+
default: 'latest'
1617

1718
runs:
1819
using: docker

entrypoint.ps1

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ $uri = "https://api.github.com/repos/Azure/bicep/releases"
2424
$headers = @{ Accept = "application/vnd.github.v3+json" }
2525

2626
$releases = Invoke-RestMethod -Method GET -Uri $uri -Headers $headers
27-
if ($Version -eq "latest") {
27+
if (($Version -eq "latest") -or ($Version -eq "")) {
2828
$release = ($releases | Select-Object -Property tag_name | Sort-Object -Descending)[0]
2929
} else {
3030
$release = ($releases | Where-Object { $_.tag_name -like $Version.Replace("x", "*") } | Select-Object -Property tag_name | Sort-Object -Descending)[0]

0 commit comments

Comments
 (0)