From 7e58bb071057e6ad04c029199977c11c62a39747 Mon Sep 17 00:00:00 2001 From: emdneto <9735060+emdneto@users.noreply.github.com> Date: Wed, 11 Mar 2026 21:47:34 -0300 Subject: [PATCH 1/2] test Signed-off-by: emdneto <9735060+emdneto@users.noreply.github.com> --- .github/workflows/check-links.yml | 45 +++++++++++++++---------------- 1 file changed, 22 insertions(+), 23 deletions(-) diff --git a/.github/workflows/check-links.yml b/.github/workflows/check-links.yml index aadb6d5651c..eafabd352d2 100644 --- a/.github/workflows/check-links.yml +++ b/.github/workflows/check-links.yml @@ -3,45 +3,44 @@ on: push: branches: [ main ] pull_request: + paths: + - '**/*.md' + - '.github/workflows/check-links.yml' + - '.github/workflows/check_links_config.json' permissions: contents: read +concurrency: + group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.run_id }} + cancel-in-progress: true + jobs: - changedfiles: - name: changed files - runs-on: ubuntu-latest - if: ${{ github.actor != 'dependabot[bot]' }} - outputs: - md: ${{ steps.changes.outputs.md }} - steps: - - name: Checkout Repo - uses: actions/checkout@v4 - with: - fetch-depth: 0 - - name: Get changed files - id: changes - run: | - echo "md=$(git diff --name-only --diff-filter=ACMRTUXB $(git merge-base origin/main ${{ github.event.pull_request.head.sha }}) ${{ github.event.pull_request.head.sha }} | grep .md$ | xargs)" >> $GITHUB_OUTPUT check-links: runs-on: ubuntu-latest - needs: changedfiles - if: | - github.event.pull_request.user.login != 'otelbot[bot]' && github.event_name == 'pull_request' - && ${{needs.changedfiles.outputs.md}} + timeout-minutes: 15 + if: ${{ github.actor != 'dependabot[bot]' && github.actor != 'otelbot[bot]' }} steps: - name: Checkout Repo - uses: actions/checkout@v4 + uses: actions/checkout@v6 + + - name: Get changed markdown files + id: changed-files + uses: tj-actions/changed-files@v46 with: - fetch-depth: 0 + files: | + **/*.md - name: Install markdown-link-check + if: steps.changed-files.outputs.any_changed == 'true' run: npm install -g markdown-link-check@v3.12.2 - name: Run markdown-link-check + if: steps.changed-files.outputs.any_changed == 'true' + env: + CHANGED_MARKDOWN_FILES: ${{ steps.changed-files.outputs.all_changed_files }} run: | - markdown-link-check \ + printf '%s\n' "$CHANGED_MARKDOWN_FILES" | tr ' ' '\n' | xargs -r -n 1 -P 4 markdown-link-check \ --verbose \ --config .github/workflows/check_links_config.json \ - ${{needs.changedfiles.outputs.md}} \ || { echo "Check that anchor links are lowercase"; exit 1; } From 9a4659c75ac000a8cf612be939e83e486130bdcb Mon Sep 17 00:00:00 2001 From: emdneto <9735060+emdneto@users.noreply.github.com> Date: Wed, 11 Mar 2026 21:59:54 -0300 Subject: [PATCH 2/2] test --- .github/workflows/check-links.yml | 7 ++++--- CHANGELOG.md | 2 ++ 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/.github/workflows/check-links.yml b/.github/workflows/check-links.yml index eafabd352d2..a353a1a74fb 100644 --- a/.github/workflows/check-links.yml +++ b/.github/workflows/check-links.yml @@ -23,6 +23,8 @@ jobs: steps: - name: Checkout Repo uses: actions/checkout@v6 + with: + fetch-depth: 0 - name: Get changed markdown files id: changed-files @@ -37,10 +39,9 @@ jobs: - name: Run markdown-link-check if: steps.changed-files.outputs.any_changed == 'true' - env: - CHANGED_MARKDOWN_FILES: ${{ steps.changed-files.outputs.all_changed_files }} run: | - printf '%s\n' "$CHANGED_MARKDOWN_FILES" | tr ' ' '\n' | xargs -r -n 1 -P 4 markdown-link-check \ + markdown-link-check \ --verbose \ --config .github/workflows/check_links_config.json \ + ${{ steps.changed-files.outputs.all_changed_files }} \ || { echo "Check that anchor links are lowercase"; exit 1; } diff --git a/CHANGELOG.md b/CHANGELOG.md index 9130b344751..4be09fa75ab 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -22,6 +22,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ([#4935](https://github.com/open-telemetry/opentelemetry-python/pull/4935)) - `opentelemetry-sdk`: upgrade vendored OTel configuration schema from v1.0.0-rc.3 to v1.0.0 ([#4965](https://github.com/open-telemetry/opentelemetry-python/pull/4965)) +- improve check-links ci job + ([#4965](https://github.com/open-telemetry/opentelemetry-python/pull/4965)) ## Version 1.40.0/0.61b0 (2026-03-04)