Skip to content

Commit

Permalink
Apply latest changes for README conversion
Browse files Browse the repository at this point in the history
* Remove badges from README.md prior to converting to HTML
* Replace Commitlint with PR Title Lint
* Lint all markdown files except for CHANGELOG.md not just README.md
* Use woke form from linux-system-roles
  • Loading branch information
spetrosi committed Aug 29, 2023
1 parent 886d78a commit 810d3d3
Show file tree
Hide file tree
Showing 5 changed files with 24 additions and 13 deletions.
3 changes: 3 additions & 0 deletions .github/workflows/build_docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,9 @@ jobs:
- name: Ensure that version and docs directories exist
run: mkdir -p ${{ env.RELEASE_VERSION }} docs

- name: Remove badges from README.md prior to converting to HTML
run: sed -i '1,8 {/^\[\!\[.*/d}' ref_branch/README.md

- name: Convert README.md to HTML and save to the version directory
uses: docker://pandoc/core:latest
with:
Expand Down
8 changes: 6 additions & 2 deletions .github/workflows/markdownlint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,12 @@ jobs:
- name: Check out code
uses: actions/checkout@v3

- name: Lint README.md
# CHANGELOG.md is generated automatically from PR titles and descriptions
# It might have issues but they are not critical
- name: Lint all markdown files except for CHANGELOG.md
uses: docker://avtodev/markdown-lint:master
with:
args: README.md
args: >-
--ignore=CHANGELOG.md
**/*.md
config: .markdownlint.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Commitlint
name: PR Title Lint
on: # yamllint disable-line rule:truthy
pull_request:
types:
Expand All @@ -25,7 +25,7 @@ jobs:
run: npm install @commitlint/config-conventional @commitlint/cli

- name: Run commitlint on PR title
run: >-
echo '${{ github.event.pull_request.title }}' |
npx commitlint --verbose
env:
PR_TITLE: ${{ github.event.pull_request.title }}
# Echo from env variable to avoid bash errors with extra characters
run: echo "$PR_TITLE" | npx commitlint --verbose
5 changes: 4 additions & 1 deletion .github/workflows/test_converting_readme.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,10 @@ jobs:
- name: Check out code
uses: actions/checkout@v3

- name: Convert README.md to HTML and save to the version directory
- name: Remove badges from README.md prior to converting to HTML
run: sed -i '1,8 {/^\[\!\[.*/d}' README.md

- name: Convert README.md to HTML
uses: docker://pandoc/core:latest
with:
args: >-
Expand Down
11 changes: 6 additions & 5 deletions .github/workflows/woke.yml
Original file line number Diff line number Diff line change
@@ -1,18 +1,19 @@
# yamllint disable rule:line-length
name: Check for non-inclusive language
name: Woke
on: # yamllint disable-line rule:truthy
- pull_request
jobs:
woke:
name: woke
name: Detect non-inclusive language
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3

- name: woke
uses: get-woke/woke-action@v0
- name: Run lsr-woke-action
# Originally, uses: get-woke/woke-action@v0
uses: linux-system-roles/lsr-woke-action@main
with:
woke-args: "-c https://raw.githubusercontent.com/linux-system-roles/tox-lsr/main/src/tox_lsr/config_files/woke.yml"
woke-args: "-c https://raw.githubusercontent.com/linux-system-roles/tox-lsr/main/src/tox_lsr/config_files/woke.yml --count-only-error-for-failure"
# Cause the check to fail on any broke rules
fail-on-error: true

0 comments on commit 810d3d3

Please sign in to comment.