-
Notifications
You must be signed in to change notification settings - Fork 28
62 lines (54 loc) · 1.69 KB
/
readme-check.yml
File metadata and controls
62 lines (54 loc) · 1.69 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
---
name: README Validation
on:
pull_request:
branches:
- 'main'
- 'release-*'
paths:
- 'components/**'
- 'pipelines/**'
- 'scripts/generate_readme/**'
- '.github/workflows/readme-check.yml'
- '.github/actions/setup-python-ci/**'
- '.github/scripts/**'
- 'pyproject.toml'
- 'uv.lock'
jobs:
check-readme-sync:
name: Check README files are up-to-date
runs-on: ubuntu-24.04
steps:
- name: Checkout code
uses: actions/checkout@v6
with:
fetch-depth: 0
- name: Get changed files
id: changed-files
uses: tj-actions/changed-files@v47
with:
files: |
components/**
pipelines/**
scripts/generate_readme/**
.github/scripts/**
files_ignore: |
**/*.md
- name: Setup Python CI
uses: ./.github/actions/setup-python-ci
with:
python-version: 3.11
- name: Extract component and pipeline directories
id: find-targets
run: |
echo "Changed files:"
echo "${{ steps.changed-files.outputs.all_changed_files }}"
# Extract unique component/pipeline directories from changed files
targets=$(./.github/scripts/utils/find-changed-components-and-pipelines.sh \
${{ steps.changed-files.outputs.all_changed_files }})
echo "targets=$targets" >> $GITHUB_OUTPUT
echo "Targets to check: $targets"
- name: Validate READMEs
if: steps.find-targets.outputs.targets != ''
run: |
./.github/scripts/validate_readmes/test-readme-check.sh ${{ steps.find-targets.outputs.targets }}