forked from open-telemetry/opentelemetry-java-examples
-
Notifications
You must be signed in to change notification settings - Fork 1
31 lines (25 loc) · 935 Bytes
/
reusable-link-check.yml
File metadata and controls
31 lines (25 loc) · 935 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
name: Reusable - Link check
on:
workflow_call:
permissions:
contents: read
jobs:
link-check:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@1af3b93b6815bc44a9784bd300feb67ff0d1eeb3 # v6.0.0
with:
fetch-depth: 0 # needed for merge-base used in lint:links-in-modified-files
- uses: jdx/mise-action@9dc7d5dd454262207dea3ab5a06a3df6afc8ff26 # v3.4.1
- name: Link check for pull requests
if: github.event_name == 'pull_request'
env:
GITHUB_TOKEN: ${{ github.token }}
run: |
mise run lint:local-links
mise run lint:links-in-modified-files --base origin/${{ github.base_ref }} --head ${{ github.event.pull_request.head.sha }}
- name: Link check for pushes and scheduled workflows
if: github.event_name != 'pull_request'
env:
GITHUB_TOKEN: ${{ github.token }}
run: mise run lint:links