This repository has been archived by the owner on Feb 14, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Add case check update checkout action version to v3 * update code owners to docops team * update action to local path * fix input
- Loading branch information
1 parent
7b574bf
commit 7f68c87
Showing
7 changed files
with
55 additions
and
9 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
--- | ||
name: Check file name case | ||
|
||
on: [pull_request] | ||
|
||
jobs: | ||
check: | ||
name: Check file name case | ||
runs-on: ubuntu-latest | ||
permissions: | ||
contents: read | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- name: Check file name case | ||
uses: ./actions/tests/case | ||
with: | ||
DOC_DIR: tests/docs |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,4 @@ | ||
# SPDX-License-Identifier: Apache-2.0 | ||
|
||
# Docs team | ||
* @ConsenSys/protocol-pliny | ||
.github/ @NicolasMassart | ||
/actions/ @NicolasMassart | ||
# DocOps team | ||
* @ConsenSys/consensys-docops |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
# SPDX-License-Identifier: Apache-2.0 | ||
--- | ||
name: 'Check pages file name case' | ||
description: 'Composite action to check case of files in doc' | ||
|
||
inputs: | ||
DOC_DIR: | ||
description: 'doc directory path from project root' | ||
required: false | ||
default: docs | ||
|
||
runs: | ||
using: "composite" | ||
steps: | ||
- name: Check pages file name case | ||
shell: sh | ||
run: | | ||
echo "Testing file case in ${{ inputs.DOC_DIR }}." | ||
passed=true | ||
for filename in `find ${{ inputs.DOC_DIR }} -name "*.md" | ( ! grep -P -v "^[[:lower:][:digit:]\/\-_]+\.md$" )` | ||
do | ||
echo "$filename" | ||
echo "::error file=$filename ::File path must be only lowercase letters, digits, - (dash) and _ (underscore)" | ||
passed=false | ||
done; | ||
if [ "$passed" = false ] ; then | ||
echo "::error ::Some files path are incorrect. Check error annotations in the pull request." | ||
echo "Correct example: my-folder/my-file-name_new2.md" | ||
echo "Wrong example: My-Folder/MyFile-NAME.old.md" | ||
exit 1 | ||
fi |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters