Skip to content

SLO Report

SLO Report #225

Workflow file for this run

name: SLO Report
on:
workflow_run:
workflows: ["SLO"]
types:
- completed
jobs:
publish-slo-report:
if: github.event.workflow_run.conclusion != 'skipped'
runs-on: ubuntu-latest
name: Publish YDB SLO Report
permissions:
actions: read
checks: write
contents: read
pull-requests: write
steps:
- name: Publish YDB SLO Report
uses: ydb-platform/ydb-slo-action/report@v2
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
github_run_id: ${{ github.event.workflow_run.id }}
remove-slo-label:
needs: publish-slo-report
if: github.event.workflow_run.conclusion != 'skipped' && github.event.workflow_run.event == 'pull_request'
runs-on: ubuntu-latest
name: Remove SLO Label
permissions:
pull-requests: write
steps:
- name: Remove SLO label from PR
env:
PRS: ${{ toJSON(github.event.workflow_run.pull_requests) }}
REPO: ${{ github.event.workflow_run.repository.full_name }}
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
set -euo pipefail
PR=$(jq -r '.[0].number' <<<"$PRS")
if [ "$PR" = "null" ] || [ -z "$PR" ]; then
echo "No pull requests associated with this workflow run"
exit 0
fi
gh pr edit "$PR" --repo "$REPO" --remove-label SLO || {
echo "SLO label not found on PR #${PR}, skipping"
}