Skip to content

Use GH built-in runner for link check workflow#17682

Merged
kirklandsign merged 7 commits intomainfrom
copilot/use-gh-runner-for-script
Feb 25, 2026
Merged

Use GH built-in runner for link check workflow#17682
kirklandsign merged 7 commits intomainfrom
copilot/use-gh-runner-for-script

Conversation

Copy link
Copy Markdown
Contributor

Copilot AI commented Feb 24, 2026

Summary

Reduce the job time from 6 minutes to 10 seconds.

Replace pytorch/test-infra reusable workflow + Docker image with direct ubuntu-latest runner for _link_check.yml. The lint scripts only need standard tools (curl, jq, perl, git, grep, sed) already on GH hosted runners. Saves server run hours and cost.

  • Switch all three jobs (lint-urls, lint-xrefs, lint-file-size) from linux_job_v2.yml + executorch-ubuntu-22.04-linter Docker image to runs-on: ubuntu-latest with actions/checkout@v4
  • Remove id-token: write permission (not needed; calling workflow doesn't grant it)
  • Replace fetch-depth: 0 (full clone) with shallow checkout + targeted git fetch --depth=1 of the base SHA
  • Replace three-dot (...) with two-dot (..) in git diff across lint_urls.sh, lint_xrefs.sh, lint_file_size.sh — direct base-to-head diff, no merge-base lookup needed

Test plan

CI — the link check jobs run on this PR.


🔒 GitHub Advanced Security automatically protects Copilot coding agent pull requests. You can protect all pull requests by enabling Advanced Security for your repositories. Learn more about Advanced Security.

@pytorch-bot
Copy link
Copy Markdown

pytorch-bot Bot commented Feb 24, 2026

🔗 Helpful Links

🧪 See artifacts and rendered test results at hud.pytorch.org/pr/pytorch/executorch/17682

Note: Links to docs will display an error until the docs builds have been completed.

⏳ No Failures, 46 Pending

As of commit c7d3492 with merge base 7e1e6b4 (image):
💚 Looks good so far! There are no failures yet. 💚

This comment was automatically generated by Dr. CI and updates every 15 minutes.

@meta-cla meta-cla Bot added the CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. label Feb 24, 2026
@github-actions
Copy link
Copy Markdown

This PR needs a release notes: label

If your change should be included in the release notes (i.e. would users of this library care about this change?), please use a label starting with release notes:. This helps us keep track and include your important work in the next release notes.

To add a label, you can comment to pytorchbot, for example
@pytorchbot label "release notes: none"

For more information, see
https://github.com/pytorch/pytorch/wiki/PyTorch-AutoLabel-Bot#why-categorize-for-release-notes-and-how-does-it-work.

Co-authored-by: kirklandsign <107070759+kirklandsign@users.noreply.github.com>
Copilot AI changed the title [WIP] Run script using GitHub built-in runner Use GitHub built-in runner for link check workflow Feb 24, 2026
Copilot AI requested a review from kirklandsign February 24, 2026 23:28
Co-authored-by: kirklandsign <107070759+kirklandsign@users.noreply.github.com>
@kirklandsign kirklandsign marked this pull request as ready for review February 24, 2026 23:33
Copilot AI review requested due to automatic review settings February 24, 2026 23:33
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR updates the reusable link-check workflow to run directly on GitHub-hosted runners (ubuntu-latest) instead of delegating to the pytorch/test-infra reusable workflow and its Docker image, keeping the existing lint script behavior while reducing runtime and required permissions.

Changes:

  • Replaced uses: pytorch/test-infra/.github/workflows/linux_job_v2.yml@main with runs-on: ubuntu-latest + actions/checkout@v4 for each link-check job.
  • Set minimal job permissions (contents: read) and removed the previously implied id-token: write need.
  • Preserved the existing script invocation logic, including diff-range selection and error messaging.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Co-authored-by: kirklandsign <107070759+kirklandsign@users.noreply.github.com>
…t scripts

Co-authored-by: kirklandsign <107070759+kirklandsign@users.noreply.github.com>
Copilot AI requested a review from GregoryComer as a code owner February 24, 2026 23:56
Copilot AI changed the title Use GitHub built-in runner for link check workflow Use GH built-in runner for link check workflow Feb 24, 2026
@kirklandsign kirklandsign reopened this Feb 25, 2026
@kirklandsign kirklandsign merged commit 3d1062c into main Feb 25, 2026
324 of 335 checks passed
@kirklandsign kirklandsign deleted the copilot/use-gh-runner-for-script branch February 25, 2026 02:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants