-
Notifications
You must be signed in to change notification settings - Fork 3k
57 lines (49 loc) · 1.88 KB
/
Copy pathdocs-review-receipt.yaml
File metadata and controls
57 lines (49 loc) · 1.88 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
# SPDX-FileCopyrightText: Copyright (c) 2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved.
# SPDX-License-Identifier: Apache-2.0
name: CI / Documentation Writer Review
on:
pull_request:
types: [opened, edited, synchronize, reopened]
permissions:
contents: read
concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number }}
cancel-in-progress: true
jobs:
docs-review-receipt:
runs-on: ubuntu-latest
timeout-minutes: 3
steps:
- name: Checkout
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
fetch-depth: 0
persist-credentials: false
- name: Setup Node.js
uses: actions/setup-node@820762786026740c76f36085b0efc47a31fe5020 # v7.0.0
with:
node-version: "22"
- name: Collect receipt inputs
id: receipt-inputs
env:
BASE_SHA: ${{ github.event.pull_request.base.sha }}
HEAD_SHA: ${{ github.event.pull_request.head.sha }}
shell: bash
run: |
set -euo pipefail
changed_files="$RUNNER_TEMP/docs-review-changed-files.txt"
git diff --name-only "$BASE_SHA" "$HEAD_SHA" > "$changed_files"
agents_blob="$(git rev-parse "${HEAD_SHA}:AGENTS.md")"
echo "changed_files=$changed_files" >> "$GITHUB_OUTPUT"
echo "agents_blob=$agents_blob" >> "$GITHUB_OUTPUT"
- name: Check documentation writer review receipt
continue-on-error: true
env:
AGENTS_BLOB: ${{ steps.receipt-inputs.outputs.agents_blob }}
CHANGED_FILES: ${{ steps.receipt-inputs.outputs.changed_files }}
run: >-
node --experimental-strip-types --no-warnings scripts/docs-review-receipt.mts check
--event "$GITHUB_EVENT_PATH"
--changed-files "$CHANGED_FILES"
--agents-blob "$AGENTS_BLOB"
--mode advisory