-
Notifications
You must be signed in to change notification settings - Fork 5
40 lines (36 loc) · 1.34 KB
/
multiservice-discovery-diff.yaml
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
28
29
30
31
32
33
34
35
36
37
38
39
40
name: MSD Diff
on:
pull_request:
branches:
- "main"
paths:
- 'rs/ic-observability/multiservice-discovery*/src/**'
jobs:
setup-runner:
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v4
with:
ref: ${{ github.event.pull_request.head.ref }}
- name: "🔧 Setup runner"
uses: ./.github/workflows/manage-runner-pre
- name: "📥 Download main test artifact"
uses: dawidd6/[email protected]
with:
name: test-artifacts
branch: main
workflow: main.yaml
- name: "🔭 Compute MSD"
run: |
set -exuo pipefail
mkdir -p tmp/main-registry tmp/branch-registry main-targets branch-targets
chmod +x multiservice-discovery
./multiservice-discovery --targets-dir tmp/main-registry --render-prom-targets-to-stdout > main-targets/targets.json
bazel run //rs/ic-observability/multiservice-discovery -- --targets-dir $(pwd)/tmp/branch-registry --render-prom-targets-to-stdout > branch-targets/targets.json
- name: "Check MSD Diff"
uses: "int128/diff-action@v1"
with:
base: /home/runner/work/dre/dre/main-targets
head: /home/runner/work/dre/dre/branch-targets
comment-header: ## MSD Diff
label: prevent-merging-MSD-diff