Skip to content

Commit 381126c

Browse files
authored
Attempt to allow manual version specifications
1 parent aeacdf8 commit 381126c

1 file changed

Lines changed: 14 additions & 2 deletions

File tree

.github/workflows/main.yml

Lines changed: 14 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
name: CmdStanPy
2-
2+
33
on:
44
push:
55
branches:
@@ -8,6 +8,13 @@ on:
88
tags:
99
- '**'
1010
pull_request:
11+
workflow_dispatch:
12+
inputs:
13+
cmdstan-version:
14+
description: 'Version to test'
15+
required: false
16+
default: 'latest'
17+
1118
jobs:
1219
get-cmdstan-version:
1320
# get the latest cmdstan version to use as part of the cache key
@@ -17,7 +24,12 @@ jobs:
1724
- name: Get CmdStan version
1825
id: check-cmdstan
1926
run: |
20-
echo "::set-output name=version::$(python -c 'import requests;print(requests.get("https://api.github.com/repos/stan-dev/cmdstan/releases/latest").json()["tag_name"][1:])')"
27+
if [[ "${{ github.event.inputs.cmdstan-version }}" == "latest" ]]; then
28+
echo "::set-output name=version::$(python -c 'import requests;print(requests.get("https://api.github.com/repos/stan-dev/cmdstan/releases/latest").json()["tag_name"][1:])')"
29+
fi
30+
if [[ "${{ github.event.inputs.cmdstan-version }}" != "latest" ]]; then
31+
echo "::set-output name=version::${{ github.event.inputs.cmdstan-version }}"
32+
fi
2133
outputs:
2234
version: ${{ steps.check-cmdstan.outputs.version }}
2335

0 commit comments

Comments
 (0)