Skip to content

Commit 36f2be2

Browse files
authored
Use shared maintenance workflows
1 parent 14a472f commit 36f2be2

1 file changed

Lines changed: 1 addition & 30 deletions

File tree

.github/workflows/protect-readme.yml

Lines changed: 1 addition & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -7,33 +7,4 @@ on:
77

88
jobs:
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

0 commit comments

Comments
 (0)