Skip to content

ssh session

ssh session #8

name: multiservice-discovery diff
on:
push:
branches:
- add-multiservice-discovery-diff
# on:
# pull_request:
# paths:
# - 'rs/ic-observability/multiservice-discovery/src/*'
# types:
# - opened
# - synchronize
jobs:
compute-targets-diff:
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: "make registry dir"
shell: bash
run: |
set -eExuo pipefail
mkdir -p registry
- name: Setup upterm session
uses: lhotari/action-upterm@v1
- name: branch-run
id: branch-run
run: |
bazel run //rs/ic-observability/multiservice-discovery -- --targets-dir registry
until curl -sL -o /dev/null http://localhost:8000; do
sleep 5
elapsed=$((elapsed + 5))
if [ $elapsed -ge 300 ]; then
echo "Timeout reached. Exiting."
exit 1
fi
done
result=(curl -sL http://localhost:8000/prom/targets)
echo "result=$result" >> $GITHUB_OUTPUT
- uses: actions/checkout@v4
with:
ref: main
- name: main run
id: main-run
run: |
bazel run //rs/ic-observability/multiservice-discovery -- --targets-dir /
until curl -sL -o /dev/null http://localhost:8000; do
sleep 5
elapsed=$((elapsed + 5))
if [ $elapsed -ge 300 ]; then
echo "Timeout reached. Exiting."
exit 1
fi
done
result=(curl -sL http://localhost:8000/prom/targets)
echo "result=$result" >> $GITHUB_OUTPUT
- uses: int128/diff-action@v1
with:
base: ${{ steps.main-run.outputs.result }}
head: ${{ steps.branch-run.outputs.result }}