Skip to content

Commit

Permalink
[ci] Fix conditional guarding monitoring configuration (#2959)
Browse files Browse the repository at this point in the history
  • Loading branch information
marun authored Apr 22, 2024
1 parent 337dfa5 commit 043fd2d
Showing 1 changed file with 9 additions and 9 deletions.
18 changes: 9 additions & 9 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -69,21 +69,21 @@ jobs:
run: ./scripts/build.sh -r
- name: Start prometheus
# Only run for the original repo; a forked repo won't have access to the monitoring credentials
if: (github.event.pull_request.head.repo.full_name == github.repository) || (github.event.repository.fork == false)
if: (github.event_name != 'pull_request') || (github.event.pull_request.head.repo.full_name == github.repository)
shell: bash
run: bash -x ./scripts/run_prometheus.sh
env:
PROMETHEUS_ID: ${{ secrets.PROMETHEUS_ID }}
PROMETHEUS_PASSWORD: ${{ secrets.PROMETHEUS_PASSWORD }}
- name: Start promtail
if: (github.event.pull_request.head.repo.full_name == github.repository) || (github.event.repository.fork == false)
if: (github.event_name != 'pull_request') || (github.event.pull_request.head.repo.full_name == github.repository)
shell: bash
run: bash -x ./scripts/run_promtail.sh
env:
LOKI_ID: ${{ secrets.LOKI_ID }}
LOKI_PASSWORD: ${{ secrets.LOKI_PASSWORD }}
- name: Notify of metrics availability
if: (github.event.pull_request.head.repo.full_name == github.repository) || (github.event.repository.fork == false)
if: (github.event_name != 'pull_request') || (github.event.pull_request.head.repo.full_name == github.repository)
shell: bash
run: .github/workflows/notify-metrics-availability.sh
env:
Expand Down Expand Up @@ -123,21 +123,21 @@ jobs:
run: ./scripts/build.sh -r
- name: Start prometheus
# Only run for the original repo; a forked repo won't have access to the monitoring credentials
if: (github.event.pull_request.head.repo.full_name == github.repository) || (github.event.repository.fork == false)
if: (github.event_name != 'pull_request') || (github.event.pull_request.head.repo.full_name == github.repository)
shell: bash
run: bash -x ./scripts/run_prometheus.sh
env:
PROMETHEUS_ID: ${{ secrets.PROMETHEUS_ID }}
PROMETHEUS_PASSWORD: ${{ secrets.PROMETHEUS_PASSWORD }}
- name: Start promtail
if: (github.event.pull_request.head.repo.full_name == github.repository) || (github.event.repository.fork == false)
if: (github.event_name != 'pull_request') || (github.event.pull_request.head.repo.full_name == github.repository)
shell: bash
run: bash -x ./scripts/run_promtail.sh
env:
LOKI_ID: ${{ secrets.LOKI_ID }}
LOKI_PASSWORD: ${{ secrets.LOKI_PASSWORD }}
- name: Notify of metrics availability
if: (github.event.pull_request.head.repo.full_name == github.repository) || (github.event.repository.fork == false)
if: (github.event_name != 'pull_request') || (github.event.pull_request.head.repo.full_name == github.repository)
shell: bash
run: .github/workflows/notify-metrics-availability.sh
env:
Expand Down Expand Up @@ -176,21 +176,21 @@ jobs:
run: ./scripts/build.sh
- name: Start prometheus
# Only run for the original repo; a forked repo won't have access to the monitoring credentials
if: (github.event.pull_request.head.repo.full_name == github.repository) || (github.event.repository.fork == false)
if: (github.event_name != 'pull_request') || (github.event.pull_request.head.repo.full_name == github.repository)
shell: bash
run: bash -x ./scripts/run_prometheus.sh
env:
PROMETHEUS_ID: ${{ secrets.PROMETHEUS_ID }}
PROMETHEUS_PASSWORD: ${{ secrets.PROMETHEUS_PASSWORD }}
- name: Start promtail
if: (github.event.pull_request.head.repo.full_name == github.repository) || (github.event.repository.fork == false)
if: (github.event_name != 'pull_request') || (github.event.pull_request.head.repo.full_name == github.repository)
shell: bash
run: bash -x ./scripts/run_promtail.sh
env:
LOKI_ID: ${{ secrets.LOKI_ID }}
LOKI_PASSWORD: ${{ secrets.LOKI_PASSWORD }}
- name: Notify of metrics availability
if: (github.event.pull_request.head.repo.full_name == github.repository) || (github.event.repository.fork == false)
if: (github.event_name != 'pull_request') || (github.event.pull_request.head.repo.full_name == github.repository)
shell: bash
run: .github/workflows/notify-metrics-availability.sh
env:
Expand Down

0 comments on commit 043fd2d

Please sign in to comment.