-
Notifications
You must be signed in to change notification settings - Fork 2
27 lines (26 loc) · 1.09 KB
/
main.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
name: Lint
on:
push:
branches: [master]
pull_request:
jobs:
pre-commit:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
- uses: actions/setup-go@v5
with:
go-version: ">=1.18.0"
- name: Install promtool
run: |
curl -s -S -L -o /tmp/promtool https://github.com/prometheus/prometheus/releases/download/v2.36.0/prometheus-2.36.0.linux-amd64.tar.gz
tar -zxf /tmp/promtool --strip-components=1 --directory /usr/local/bin &> /dev/null
- name: Install mimirtool
run: |
curl --silent --show-error --fail --location https://github.com/grafana/mimir/releases/download/mimir-2.10.5/mimirtool-linux-amd64 --output /usr/local/bin/mimirtool
echo "72f46c82c303c48566844612f83ab53d4b804c665644163ad7f0f8945caa0521 /usr/local/bin/mimirtool" | sha256sum --check --status
chmod +x /usr/local/bin/mimirtool
- name: Patch PATH to include GOBIN
run: echo "PATH=$(echo $PATH):/home/runner/go/bin" >> $GITHUB_ENV
- uses: pre-commit/[email protected]