Skip to content

Commit 5559fc9

Browse files
authored
Merge pull request #156 from consideRatio/pr/test-latest-go-jsonnet
ci: test against latest go-jsonnet
2 parents ac8f527 + dbec41e commit 5559fc9

File tree

1 file changed

+14
-4
lines changed

1 file changed

+14
-4
lines changed

.github/workflows/test.yaml

Lines changed: 14 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -22,21 +22,31 @@ on:
2222

2323
jobs:
2424
render-dashboards:
25-
runs-on: ubuntu-22.04
25+
runs-on: ubuntu-24.04
2626

2727
strategy:
2828
fail-fast: false
2929
matrix:
30-
jsonnet-version: ["0.20.0"]
30+
# test against a fixed older version we look to support and the latest
31+
# available version at https://github.com/google/go-jsonnet/releases/
32+
jsonnet-version:
33+
- "v0.20.0"
34+
- "latest"
3135

3236
steps:
3337
- uses: actions/checkout@v5
3438

3539
- name: Download jsonnet (go-jsonnet)
3640
run: |
3741
JSONNET_VERSION=${{ matrix.jsonnet-version }}
38-
wget -qO- https://github.com/google/go-jsonnet/releases/download/v${JSONNET_VERSION}/go-jsonnet_${JSONNET_VERSION}_Linux_x86_64.tar.gz \
39-
| tar -xvz --one-top-level=$HOME/.local/bin
42+
if [ "$JSONNET_VERSION" == "latest" ]; then
43+
JSONNET_VERSION=$(curl -s https://api.github.com/repos/google/go-jsonnet/releases/latest | jq -r .tag_name)
44+
JSONNET_URL=https://github.com/google/go-jsonnet/releases/download/${JSONNET_VERSION}/go-jsonnet_Linux_x86_64.tar.gz
45+
else
46+
JSONNET_URL=https://github.com/google/go-jsonnet/releases/download/${JSONNET_VERSION}/go-jsonnet_${JSONNET_VERSION#v}_Linux_x86_64.tar.gz
47+
fi
48+
49+
wget -qO- "$JSONNET_URL" | tar -xvz --one-top-level=$HOME/.local/bin
4050
4151
- run: jsonnet --version
4252

0 commit comments

Comments
 (0)