Skip to content

Commit d958c77

Browse files
committed
Use shared check file
1 parent 47055cd commit d958c77

5 files changed

Lines changed: 16 additions & 33 deletions

File tree

.github/script/check-file.sh

Lines changed: 0 additions & 17 deletions
This file was deleted.

.github/workflows/1-add-headers.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -56,10 +56,10 @@ jobs:
5656

5757
# Check that there is at least one header in the markdown file.
5858
- name: Check markdown syntax, header
59-
run: ./.github/script/check-file.sh
60-
env:
61-
FILE: "index.md"
62-
SEARCH: "# [a-zA-Z0-9]"
59+
uses: skills/action-check-file@v1
60+
with:
61+
file: "index.md"
62+
search: "# [a-zA-Z0-9]"
6363

6464
# In README.md, switch step 1 for step 2.
6565
- name: Update to step 2

.github/workflows/2-add-an-image.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -56,10 +56,10 @@ jobs:
5656

5757
# Check that there is at least one image in the markdown file.
5858
- name: Check markdown syntax, image
59-
run: ./.github/script/check-file.sh
60-
env:
61-
FILE: "index.md"
62-
SEARCH: "\\!\\[.*](.*)"
59+
uses: skills/action-check-file@v1
60+
with:
61+
file: "index.md"
62+
search: "\\!\\[.*](.*)"
6363

6464
# In README.md, switch step 2 for step 3.
6565
- name: Update to step 3

.github/workflows/3-add-a-code-example.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -56,10 +56,10 @@ jobs:
5656

5757
# Check that there is at least one code example in the markdown file.
5858
- name: Check markdown syntax, code example
59-
run: ./.github/script/check-file.sh
60-
env:
61-
FILE: "index.md"
62-
SEARCH: "\\`\\`\\`"
59+
uses: skills/action-check-file@v1
60+
with:
61+
file: "index.md"
62+
search: "\\`\\`\\`"
6363

6464
# In README.md, switch step 3 for step 4.
6565
- name: Update to step 4

.github/workflows/4-make-a-task-list.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -56,10 +56,10 @@ jobs:
5656

5757
# Make sure there is at least one task list item in the file.
5858
- name: Check markdown syntax, task list
59-
run: ./.github/script/check-file.sh
60-
env:
61-
FILE: "index.md"
62-
SEARCH: "\\- \\[ ] "
59+
uses: skills/action-check-file@v1
60+
with:
61+
file: "index.md"
62+
search: "\\- \\[ ] "
6363

6464
# In README.md, switch step 4 for step 5.
6565
- name: Update to step 5

0 commit comments

Comments
 (0)