-
Notifications
You must be signed in to change notification settings - Fork 65
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: Add automation check for readme file (#1055)
Signed-off-by: Flavius Lacatusu <[email protected]>
- Loading branch information
Showing
1 changed file
with
26 additions
and
0 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,26 @@ | ||
name: Chectl | ||
on: [pull_request] | ||
|
||
jobs: | ||
run: | ||
name: Automation checks | ||
runs-on: ubuntu-20.04 | ||
steps: | ||
- name: Checkout repo | ||
uses: actions/checkout@v2 | ||
- name: Set up Node.js | ||
uses: actions/setup-node@v1 | ||
with: | ||
node-version: 12.x | ||
- name: Install chectl dependencies | ||
run: yarn | ||
- name: Pack chectl | ||
run: yarn oclif-dev readme | ||
- name: Check README.md state | ||
run: | | ||
IFS=$'\n' read -d '' -r -a FILES_CHANGED_ARRAY < <( git ls-files -m ) || true | ||
# check if readme it is up to date | ||
if [[ " ${FILES_CHANGED_ARRAY[@]} " =~ "README.md" ]]; then | ||
echo "[ERROR] README.md it is not up to date. Please run 'yarn oclif-dev readme' to update and commit the changes." | ||
exit 1 | ||
fi |