Skip to content

Commit

Permalink
Use shared check file
Browse files Browse the repository at this point in the history
  • Loading branch information
heiskr committed May 31, 2023
1 parent 47055cd commit d958c77
Show file tree
Hide file tree
Showing 5 changed files with 16 additions and 33 deletions.
17 changes: 0 additions & 17 deletions .github/script/check-file.sh

This file was deleted.

8 changes: 4 additions & 4 deletions .github/workflows/1-add-headers.yml
Original file line number Diff line number Diff line change
Expand Up @@ -56,10 +56,10 @@ jobs:

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

# In README.md, switch step 1 for step 2.
- name: Update to step 2
Expand Down
8 changes: 4 additions & 4 deletions .github/workflows/2-add-an-image.yml
Original file line number Diff line number Diff line change
Expand Up @@ -56,10 +56,10 @@ jobs:

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

# In README.md, switch step 2 for step 3.
- name: Update to step 3
Expand Down
8 changes: 4 additions & 4 deletions .github/workflows/3-add-a-code-example.yml
Original file line number Diff line number Diff line change
Expand Up @@ -56,10 +56,10 @@ jobs:

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

# In README.md, switch step 3 for step 4.
- name: Update to step 4
Expand Down
8 changes: 4 additions & 4 deletions .github/workflows/4-make-a-task-list.yml
Original file line number Diff line number Diff line change
Expand Up @@ -56,10 +56,10 @@ jobs:

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

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

0 comments on commit d958c77

Please sign in to comment.