mirror of
https://github.com/open-telemetry/opentelemetry-go.git
synced 2024-12-14 10:13:10 +02:00
57a248d375
* Replace markdown link check action with script * Add change to changelog * Fix spelling error in CHANGELOG
58 lines
1.7 KiB
YAML
58 lines
1.7 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@v3
|
|
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@v3
|
|
- name: Run linter
|
|
uses: docker://avtodev/markdown-lint:v1
|
|
with:
|
|
args: ${{needs.changedfiles.outputs.md}}
|
|
|
|
check-links:
|
|
runs-on: ubuntu-latest
|
|
needs: changedfiles
|
|
if: ${{needs.changedfiles.outputs.md}}
|
|
steps:
|
|
- name: Checkout Repo
|
|
uses: actions/checkout@v3
|
|
with:
|
|
fetch-depth: 0
|
|
# This doesn't use gaurav-nelson/github-action-markdown-link-check
|
|
# intentionally. As of v1.0.13 the base image was not pinned to a LTS
|
|
# version of node and updates upstream to the base image caused CI
|
|
# failures. This boils down the entrypoint script from that repository
|
|
# and calls markdown-link-check directly instead.
|
|
- name: Install markdown-link-check
|
|
run: npm install -g markdown-link-check
|
|
- name: Run markdown-link-check
|
|
run: |
|
|
markdown-link-check \
|
|
--verbose \
|
|
--config .markdown-link.json \
|
|
${{needs.changedfiles.outputs.md}}
|