File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 77
88jobs :
99 check-readme :
10- runs-on : ubuntu-latest
11- steps :
12- - name : Block direct README edits
13- if : github.event.pull_request.user.type != 'Bot'
14- uses : actions/github-script@v9
15- with :
16- script : |
17- const files = await github.paginate(github.rest.pulls.listFiles, {
18- owner: context.repo.owner,
19- repo: context.repo.repo,
20- pull_number: context.payload.pull_request.number,
21- per_page: 100,
22- });
23-
24- const hasSourceChanges = files.some(f =>
25- f.filename === 'awesome-list.yaml' ||
26- f.filename.startsWith('data/') ||
27- f.filename.startsWith('scripts/') ||
28- f.filename.startsWith('schema/')
29- );
30-
31- if (!hasSourceChanges) {
32- core.setFailed(
33- 'README.md must not be edited directly.\n\n' +
34- 'This repository uses a data-first workflow and auto-generates README.md from YAML files.\n\n' +
35- 'To suggest a new resource, open an issue instead:\n' +
36- `https://github.com/${context.repo.owner}/${context.repo.repo}/issues/new/choose`
37- );
38- }
39-
10+ uses : jslee02/awesome-list-infra/.github/workflows/protect-readme.yml@main
You can’t perform that action at this time.
0 commit comments