Skip to content

QVAC-18935 test[skiplog]: retry on RequestRejectedByPolicyError in logging tests #226

QVAC-18935 test[skiplog]: retry on RequestRejectedByPolicyError in logging tests

QVAC-18935 test[skiplog]: retry on RequestRejectedByPolicyError in logging tests #226

name: Dispatch on README (sdk)
on:
pull_request:
types: [closed]
paths:
- "packages/sdk/**"
env:
WORKDIR: packages/sdk
permissions:
contents: read
jobs:
label-gate:
name: Authorise (label-gate)
runs-on: ubuntu-latest
permissions:
contents: read
pull-requests: write
outputs:
authorised: ${{ steps.gate.outputs.authorised }}
steps:
- name: Checkout (label-gate action only)
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # 6.0.2
with:
ref: ${{ github.event.repository.default_branch }}
sparse-checkout: .github/actions/label-gate
sparse-checkout-cone-mode: false
- name: Run label-gate
id: gate
uses: ./.github/actions/label-gate
with:
github-token: ${{ secrets.PAT_TOKEN }}
dispatch:
if: needs.label-gate.outputs.authorised == 'true' && (github.event.pull_request.merged == true && github.event.pull_request.base.ref == 'main')
runs-on: ubuntu-latest
environment: release
steps:
- name: Checkout merge commit
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # 6.0.2
with:
ref: ${{ github.event.pull_request.merge_commit_sha }}
fetch-depth: 0
- name: Detect README change
id: changed
shell: bash
env:
MERGE_SHA: ${{ github.event.pull_request.merge_commit_sha }}
BASE_SHA: ${{ github.event.pull_request.base.sha }}
WORKDIR: ${{ env.WORKDIR }}
run: |
set -euo pipefail
# Ensure the merge commit exists locally (in case of shallow clone)
git fetch --no-tags origin "${MERGE_SHA}" --depth=2 || true
README_ROOT="README.md"
README_WORKDIR="${WORKDIR%/}/README.md"
echo "Checking README changes in:"
echo " - ${README_ROOT}"
echo " - ${README_WORKDIR}"
# Compare base -> merge commit (more reliable than MERGE_SHA^1) # <-- CHANGED
CHANGED_FILES="$(git diff --name-only "${BASE_SHA}" "${MERGE_SHA}" || true)"
echo "Changed files:"
echo "${CHANGED_FILES}"
if echo "${CHANGED_FILES}" | grep -xq "${README_ROOT}"; then
echo "readme_changed=true" >> "$GITHUB_OUTPUT"
exit 0
fi
if echo "${CHANGED_FILES}" | grep -xq "${README_WORKDIR}"; then
echo "readme_changed=true" >> "$GITHUB_OUTPUT"
exit 0
fi
echo "readme_changed=false" >> "$GITHUB_OUTPUT"
- name: Repository Dispatch
if: steps.changed.outputs.readme_changed == 'true'
uses: peter-evans/repository-dispatch@28959ce8df70de7be546dd1250a005dd32156697 # 4.0.1
with:
token: ${{ secrets.PAT_TOKEN }}
repository: tetherto/qvac-docs
event-type: readme-changed
client-payload: >
{"repo_url":"https://github.com/${{ github.repository }}","workdir":"${{ env.WORKDIR }}"}
needs:
- label-gate