Repository navigation
Expand file tree
/
Copy pathdocumentation-synchronization-audit.yml
More file actions
73 lines (64 loc) · 2.04 KB
/
Copy pathdocumentation-synchronization-audit.yml
File metadata and controls
73 lines (64 loc) · 2.04 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
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
name: Documentation Synchronization Audit (opentelemetry.io)
on:
workflow_call:
workflow_dispatch:
permissions:
contents: read
jobs:
crawl:
outputs:
success: ${{ steps.doc-site-audit.outputs.success }}
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
persist-credentials: false
- uses: actions/setup-java@b843ebf9b913146b38da2eaa7aeddf76074ae1ad # v6.1.0
with:
distribution: temurin
java-version-file: .java-version
- name: Set up gradle
uses: gradle/actions/setup-gradle@3f5f9adaf7d9fecd50b5935e54106014257a94e6 # v6.4.0
with:
cache-read-only: true
- name: Run instrumentation analyzer (identify any module changes)
run: ./gradlew :instrumentation-docs:runAnalysis
- name: Run doc site audit
id: doc-site-audit
run: |
set -euo pipefail
./gradlew :instrumentation-docs:docSiteAudit
audit_result=$(cat instrumentation-docs/build/audit-result)
case "$audit_result" in
clean)
echo "success=true" >> "$GITHUB_OUTPUT"
;;
drift)
echo "success=false" >> "$GITHUB_OUTPUT"
;;
*)
echo "Unexpected documentation audit result: $audit_result" >&2
exit 1
;;
esac
documentation-drift-notification:
permissions:
contents: read
issues: write
needs:
- crawl
if: ${{ needs.crawl.result == 'success' }}
uses: $/.github/workflows/reusable-workflow-notification.yml
with:
success: ${{ needs.crawl.outputs.success == 'true' }}
title: "Documentation sync needed: opentelemetry.io site out of sync"
workflow-notification:
permissions:
contents: read
issues: write
needs:
- crawl
if: always()
uses: $/.github/workflows/reusable-workflow-notification.yml
with:
success: ${{ needs.crawl.result == 'success' }}