1
0
mirror of https://github.com/open-telemetry/opentelemetry-go.git synced 2024-12-12 10:04:29 +02:00
opentelemetry-go/.github/workflows/markdown-fail-fast.yml
Tyler Yahn e8fbfd3ec5
Update Link Checking and Markdown Linting Workflows (#2795)
* Add full docs check workflow

* Rename file

* Remove on pull requests trigger

Only run on merge to main and daily at 9am.

* Refactor link and markdown lint workflows

* Add lycheeignore

* Unify link check job name

* Remove markdown-link config

Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
2022-04-19 15:13:40 -07:00

35 lines
893 B
YAML

name: Markdown (Fail Fast)
on:
push:
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}}