Skip to content

Commit 043fd2d

Browse files
authored
[ci] Fix conditional guarding monitoring configuration (#2959)
1 parent 337dfa5 commit 043fd2d

File tree

1 file changed

+9
-9
lines changed

1 file changed

+9
-9
lines changed

.github/workflows/ci.yml

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -69,21 +69,21 @@ jobs:
6969
run: ./scripts/build.sh -r
7070
- name: Start prometheus
7171
# Only run for the original repo; a forked repo won't have access to the monitoring credentials
72-
if: (github.event.pull_request.head.repo.full_name == github.repository) || (github.event.repository.fork == false)
72+
if: (github.event_name != 'pull_request') || (github.event.pull_request.head.repo.full_name == github.repository)
7373
shell: bash
7474
run: bash -x ./scripts/run_prometheus.sh
7575
env:
7676
PROMETHEUS_ID: ${{ secrets.PROMETHEUS_ID }}
7777
PROMETHEUS_PASSWORD: ${{ secrets.PROMETHEUS_PASSWORD }}
7878
- name: Start promtail
79-
if: (github.event.pull_request.head.repo.full_name == github.repository) || (github.event.repository.fork == false)
79+
if: (github.event_name != 'pull_request') || (github.event.pull_request.head.repo.full_name == github.repository)
8080
shell: bash
8181
run: bash -x ./scripts/run_promtail.sh
8282
env:
8383
LOKI_ID: ${{ secrets.LOKI_ID }}
8484
LOKI_PASSWORD: ${{ secrets.LOKI_PASSWORD }}
8585
- name: Notify of metrics availability
86-
if: (github.event.pull_request.head.repo.full_name == github.repository) || (github.event.repository.fork == false)
86+
if: (github.event_name != 'pull_request') || (github.event.pull_request.head.repo.full_name == github.repository)
8787
shell: bash
8888
run: .github/workflows/notify-metrics-availability.sh
8989
env:
@@ -123,21 +123,21 @@ jobs:
123123
run: ./scripts/build.sh -r
124124
- name: Start prometheus
125125
# Only run for the original repo; a forked repo won't have access to the monitoring credentials
126-
if: (github.event.pull_request.head.repo.full_name == github.repository) || (github.event.repository.fork == false)
126+
if: (github.event_name != 'pull_request') || (github.event.pull_request.head.repo.full_name == github.repository)
127127
shell: bash
128128
run: bash -x ./scripts/run_prometheus.sh
129129
env:
130130
PROMETHEUS_ID: ${{ secrets.PROMETHEUS_ID }}
131131
PROMETHEUS_PASSWORD: ${{ secrets.PROMETHEUS_PASSWORD }}
132132
- name: Start promtail
133-
if: (github.event.pull_request.head.repo.full_name == github.repository) || (github.event.repository.fork == false)
133+
if: (github.event_name != 'pull_request') || (github.event.pull_request.head.repo.full_name == github.repository)
134134
shell: bash
135135
run: bash -x ./scripts/run_promtail.sh
136136
env:
137137
LOKI_ID: ${{ secrets.LOKI_ID }}
138138
LOKI_PASSWORD: ${{ secrets.LOKI_PASSWORD }}
139139
- name: Notify of metrics availability
140-
if: (github.event.pull_request.head.repo.full_name == github.repository) || (github.event.repository.fork == false)
140+
if: (github.event_name != 'pull_request') || (github.event.pull_request.head.repo.full_name == github.repository)
141141
shell: bash
142142
run: .github/workflows/notify-metrics-availability.sh
143143
env:
@@ -176,21 +176,21 @@ jobs:
176176
run: ./scripts/build.sh
177177
- name: Start prometheus
178178
# Only run for the original repo; a forked repo won't have access to the monitoring credentials
179-
if: (github.event.pull_request.head.repo.full_name == github.repository) || (github.event.repository.fork == false)
179+
if: (github.event_name != 'pull_request') || (github.event.pull_request.head.repo.full_name == github.repository)
180180
shell: bash
181181
run: bash -x ./scripts/run_prometheus.sh
182182
env:
183183
PROMETHEUS_ID: ${{ secrets.PROMETHEUS_ID }}
184184
PROMETHEUS_PASSWORD: ${{ secrets.PROMETHEUS_PASSWORD }}
185185
- name: Start promtail
186-
if: (github.event.pull_request.head.repo.full_name == github.repository) || (github.event.repository.fork == false)
186+
if: (github.event_name != 'pull_request') || (github.event.pull_request.head.repo.full_name == github.repository)
187187
shell: bash
188188
run: bash -x ./scripts/run_promtail.sh
189189
env:
190190
LOKI_ID: ${{ secrets.LOKI_ID }}
191191
LOKI_PASSWORD: ${{ secrets.LOKI_PASSWORD }}
192192
- name: Notify of metrics availability
193-
if: (github.event.pull_request.head.repo.full_name == github.repository) || (github.event.repository.fork == false)
193+
if: (github.event_name != 'pull_request') || (github.event.pull_request.head.repo.full_name == github.repository)
194194
shell: bash
195195
run: .github/workflows/notify-metrics-availability.sh
196196
env:

0 commit comments

Comments
 (0)