Skip to content

Commit

Permalink
feat: Add automation check for readme file (#1055)
Browse files Browse the repository at this point in the history
Signed-off-by: Flavius Lacatusu <[email protected]>
  • Loading branch information
flacatus authored Jan 8, 2021
1 parent 9e013aa commit 8cad4d8
Showing 1 changed file with 26 additions and 0 deletions.
26 changes: 26 additions & 0 deletions .github/workflows/automation-check.yml
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

0 comments on commit 8cad4d8

Please sign in to comment.