mirror of
https://github.com/open-telemetry/opentelemetry-go.git
synced 2024-12-12 10:04:29 +02:00
f40cad5ee2
* Add Markdown link check * Add replacement for registry URL and clean ignored * Fix config file name * Update .markdown-link.json Co-authored-by: Anthony Mirabella <a9@aneurysm9.com> Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
51 lines
1.3 KiB
YAML
51 lines
1.3 KiB
YAML
name: markdown
|
|
on:
|
|
push:
|
|
branches:
|
|
- main
|
|
pull_request:
|
|
jobs:
|
|
changedfiles:
|
|
name: changed files
|
|
runs-on: ubuntu-latest
|
|
outputs:
|
|
md: ${{ steps.changes.outputs.md }}
|
|
steps:
|
|
- name: Checkout Repo
|
|
uses: actions/checkout@v2
|
|
with:
|
|
fetch-depth: 0
|
|
- name: Get changed files
|
|
id: changes
|
|
run: |
|
|
echo "::set-output name=md::$(git diff --name-only --diff-filter=ACMRTUXB origin/${{ github.event.pull_request.base.ref }} ${{ github.event.pull_request.head.sha }} | grep .md$ | xargs)"
|
|
|
|
lint:
|
|
name: lint markdown files
|
|
runs-on: ubuntu-latest
|
|
needs: changedfiles
|
|
if: ${{needs.changedfiles.outputs.md}}
|
|
steps:
|
|
- name: Checkout Repo
|
|
uses: actions/checkout@v2
|
|
- name: Run linter
|
|
uses: docker://avtodev/markdown-lint:v1
|
|
with:
|
|
args: ${{needs.changedfiles.outputs.md}}
|
|
|
|
check-links:
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- name: Checkout Repo
|
|
uses: actions/checkout@v2
|
|
with:
|
|
fetch-depth: 0
|
|
- uses: gaurav-nelson/github-action-markdown-link-check@v1
|
|
with:
|
|
base-branch: 'main'
|
|
use-quiet-mode: 'yes'
|
|
use-verbose-mode: 'yes'
|
|
config-file: '.markdown-link.json'
|
|
check-modified-files-only: 'yes'
|
|
folder-path: ''
|