Skip to content

Commit

Permalink
.github: better downloading of promtool
Browse files Browse the repository at this point in the history
Signed-off-by: paulfantom <[email protected]>
  • Loading branch information
paulfantom committed Feb 12, 2021
1 parent 31f8be6 commit 06b8d37
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions .github/workflows/prometheusrule.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,5 +15,10 @@ jobs:
- uses: actions/setup-go@v2
with:
go-version: '1.15'
- run: go get -u github.com/prometheus/prometheus/cmd/promtool
- run: verify-prometheus-rules.sh
- run: go get -u github.com/brancz/gojsontoyaml
#- run: go get -u github.com/prometheus/prometheus/cmd/promtool
- name: Download latest release of promtool
run: |
VERSION=$(curl -s https://api.github.com/repos/prometheus/prometheus/releases/latest | grep "tag_name" | awk '{print substr($2, 2, length($2)-3)}' | sed 's/v//')
curl -s -L "https://github.com/prometheus/prometheus/releases/download/v${VERSION}/prometheus-${VERSION}.linux-amd64.tar.gz" | tar -zxf - -C "${GITHUB_WORKSPACE}/" --strip-components 1 "prometheus-${VERSION}.linux-amd64/promtool"
- run: PATH="${PATH}:${GITHUB_WORKSPACE}" ./hack/verify-prometheus-rules.sh

0 comments on commit 06b8d37

Please sign in to comment.