diff --git a/.github/workflows/markdownlint.yml b/.github/workflows/markdownlint.yml new file mode 100644 index 0000000..4337ff0 --- /dev/null +++ b/.github/workflows/markdownlint.yml @@ -0,0 +1,37 @@ +name: Markdown lint + +on: + pull_request: + branches: [master] + +jobs: + markdownlint: + runs-on: ubuntu-latest + steps: + - name: Checkout the repository + uses: actions/checkout@v4 + with: + fetch-depth: 0 + + - name: Get changed markdown files + id: changed + run: | + files=$(git diff --name-only --diff-filter=d origin/${{ github.base_ref }}...HEAD -- '*.md') + if [ -z "$files" ]; then + echo "files=" >> "$GITHUB_OUTPUT" + echo "No changed markdown files found." + else + echo "files<> "$GITHUB_OUTPUT" + echo "$files" >> "$GITHUB_OUTPUT" + echo "EOF" >> "$GITHUB_OUTPUT" + echo "Changed markdown files:" + echo "$files" + fi + + - name: Install markdownlint + if: steps.changed.outputs.files != '' + run: sudo apt-get install -y markdownlint + + - name: Run markdownlint + if: steps.changed.outputs.files != '' + run: echo "${{ steps.changed.outputs.files }}" | xargs mdl diff --git a/libblockdev/libblockdev.md b/libblockdev/libblockdev.md index 61460bf..ba7a14d 100644 --- a/libblockdev/libblockdev.md +++ b/libblockdev/libblockdev.md @@ -38,3 +38,6 @@ Following storage technologies are supported by libblockdev - NVDIMM namespaces (deprecated) - NVMe - SMART + + +*a**