Skip to content

Commit 6445b8d

Browse files
committed
Add new checks
1 parent d89b049 commit 6445b8d

File tree

3 files changed

+54
-32
lines changed

3 files changed

+54
-32
lines changed

.github/workflows/blank.yml

Lines changed: 0 additions & 32 deletions
This file was deleted.
Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
name: 'Check for CONTRIBUTING file'
2+
3+
on:
4+
push:
5+
branches:
6+
- 'main'
7+
pull_request:
8+
branches:
9+
- 'main'
10+
workflow_dispatch:
11+
12+
jobs:
13+
check-for-CONTRIBUTING:
14+
runs-on: 'ubuntu-latest'
15+
steps:
16+
- name: 'Checkout repository'
17+
uses: 'actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683' # ratchet:actions/checkout@v4
18+
19+
- name: 'Verify CONTRIBUTING exists'
20+
run: |
21+
if [ -f CONTRIBUTING.md ] || [ -f CONTRIBUTING.rst ] || [ -f CONTRIBUTING ] || [ -f contributing.md ] || [ -f contributing.rst ] || [ -f contributing ]; then
22+
echo "A CONTRIBUTING file was found."
23+
exit 0
24+
else
25+
echo "Error: No CONTRIBUTING file found. Please add a CONTRIBUTING.md or CONTRIBUTING.rst file."
26+
exit 1
27+
fi

.github/workflows/readme-check.yml

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
name: 'Check for README file'
2+
3+
on:
4+
push:
5+
branches:
6+
- 'main'
7+
pull_request:
8+
branches:
9+
- 'main'
10+
workflow_dispatch:
11+
12+
jobs:
13+
check-for-readme:
14+
runs-on: 'ubuntu-latest'
15+
steps:
16+
- name: 'Checkout repository'
17+
uses: 'actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683' # ratchet:actions/checkout@v4
18+
19+
- name: 'Verify README exists'
20+
run: |
21+
if [ -f README.md ] || [ -f README.rst ] || [ -f README ] || [ -f readme.md ] || [ -f readme.rst ] || [ -f readme ]; then
22+
echo "A README file was found."
23+
exit 0
24+
else
25+
echo "Error: No README file found. Please add a README.md or README.rst file."
26+
exit 1
27+
fi

0 commit comments

Comments
 (0)