Skip to content

Commit

Permalink
Add check-markdown
Browse files Browse the repository at this point in the history
This commit introduces an action based on the markdown check in release process for:

https://github.com/eclipse-kuksa/kuksa-databroker/wiki/Release-Process#checking-links

Intention is to run it on each PR, a PR in Databroker will be created as soon as this one
is merged and tagged as v 4.1
  • Loading branch information
erikbosch committed Jun 5, 2024
1 parent 0ea8ece commit f2f7839
Show file tree
Hide file tree
Showing 5 changed files with 39 additions and 3 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ Alternatively tags can be used to specify exactly which version of this workflow
```
jobs:
check_ghcr_push:
uses: eclipse-kuksa/kuksa-actions/.github/workflows/check_ghcr_push.yml@main
uses: eclipse-kuksa/kuksa-actions/.github/workflows/check_ghcr_push.yml@4
secrets: inherit
build-something:
Expand Down
2 changes: 1 addition & 1 deletion check-dash/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ You need an input file that Dash can understand, then give it as input like belo

```yaml
- name: Dash license check
uses: eclipse-kuksa/kuksa-actions/check-dash@2
uses: eclipse-kuksa/kuksa-actions/check-dash@4
with:
dashinput: ${{github.workspace}}/dash-databroker-deps
```
Expand Down
21 changes: 21 additions & 0 deletions check-markdown/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
# Check Markdown

An action using [markdown-link-check](https://github.com/tcort/markdown-link-check) to check that all links
in markdown (`*.md`) files are functional.

## How to use

An example on how to use this action to check all `*.md` files in a repository is shown below.

```yaml
check-doc-links:
name: Check links in markdown
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v4
- uses: eclipse-kuksa/kuksa-actions/check-markdown@4

```


15 changes: 15 additions & 0 deletions check-markdown/action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@

name: Checking Markdown
description: Check if links in markdown files are functional

runs:
using: "composite"
steps:
- uses: actions/checkout@v4

- name: Install and run npm
shell: bash
run: |
npm install -g markdown-link-check
markdown-link-check --version
find . -name \*.md -print0 | xargs -0 -n1 markdown-link-check -q -a 403,200,404
2 changes: 1 addition & 1 deletion spdx/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ that files modified in a Pull Request has an SPDX license identifier.

It shall be possible to use this action from other repositories by referencing:

`- uses: eclipse-kuksa/kuksa-actions/spdx@2`
`- uses: eclipse-kuksa/kuksa-actions/spdx@4`

If you accept multiple licenses it can be specified like:

Expand Down

0 comments on commit f2f7839

Please sign in to comment.