Skip to content

[build] Use self-repository syntax for same-repository references - #5106

Draft
arturcic wants to merge 1 commit into
GitTools:mainfrom
arturcic:build/5103-self-repository-syntax
Draft

[build] Use self-repository syntax for same-repository references#5106
arturcic wants to merge 1 commit into
GitTools:mainfrom
arturcic:build/5103-self-repository-syntax

Conversation

@arturcic

Copy link
Copy Markdown
Member

Description

  • Replace all same-repository action references with the new $/ syntax.
  • Replace reusable workflow calls with same-commit $/ references.
  • Keep checkout steps that are still required for build scripts, repository files, Docker inputs, or documentation sources.
  • Add a narrowly scoped Actionlint workaround for the two diagnostics that do not yet recognize the new syntax.

Related Issue

Resolves #5103

Blocked By

This draft PR is blocked by rhysd/actionlint#711.

Actionlint 1.7.12 does not yet recognize the $/ self-repository syntax. The temporary ignores in .github/actionlint.yaml keep all other lint checks active and should be removed once upstream support is available and used by this repository.

Motivation and Context

Self-repository references resolve actions and reusable workflows from the exact commit running the workflow. This keeps internal composition aligned when callers pin a workflow to a full commit SHA and avoids requiring checkout solely to load an action.

How Has This Been Tested?

  • actionlint
  • git diff --check
  • Verified that .github/workflows contains no remaining workspace-relative uses: ./ references.
  • Reviewed every neighboring checkout; each remaining checkout has a separate runtime purpose.

Screenshots

Not applicable.

Checklist

  • My code follows the code style of this project.
  • My change requires a change to the documentation.
  • I have updated the documentation accordingly.
  • I have added tests to cover my changes.
  • All new and existing tests passed.

@arturcic
arturcic force-pushed the build/5103-self-repository-syntax branch from d857724 to 69319bf Compare August 1, 2026 20:51
Copilot AI review requested due to automatic review settings August 1, 2026 20:51
@sonarqubecloud

sonarqubecloud Bot commented Aug 1, 2026

Copy link
Copy Markdown

Quality Gate Failed Quality Gate failed

Failed conditions
C Security Rating on New Code (required ≥ A)

See analysis details on SonarQube Cloud

Catch issues before they fail your Quality Gate with our IDE extension SonarQube for IDE

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

Updates GitHub Actions workflow composition across the repository to use GitHub’s new self-repository $/ syntax for same-repo actions and reusable workflows, ensuring references resolve from the exact commit running the workflow (without requiring checkout solely to load local actions). It also introduces a temporary, narrowly scoped Actionlint ignore configuration to accommodate current Actionlint limitations with the new syntax.

Changes:

  • Replaced same-repository reusable workflow calls (previously ./.github/workflows/...) with $/... references in the main CI workflow.
  • Replaced same-repository action references (previously ./.github/actions/...) with $/... references across several reusable workflows and docs workflow steps.
  • Added .github/actionlint.yaml and updated the Actionlint workflow triggers to include it, to temporarily ignore the two known diagnostics that don’t yet understand $/.

Reviewed changes

Copilot reviewed 12 out of 12 changed files in this pull request and generated no comments.

Show a summary per file
File Description
.github/workflows/docs.yml Switches cache restore action to $/ syntax in docs build/publish jobs.
.github/workflows/ci.yml Switches reusable workflow calls and a few internal action steps to $/ syntax.
.github/workflows/actionlint.yml Ensures Actionlint workflow runs when the Actionlint config file changes.
.github/workflows/_unit_tests.yml Switches cache restore action to $/ syntax in unit test workflow.
.github/workflows/_publish.yml Switches cache restore action to $/ syntax in publish workflow.
.github/workflows/_prepare.yml Switches cache restore action to $/ syntax in prepare workflow.
.github/workflows/_docker.yml Switches internal cache/docker action references to $/ syntax.
.github/workflows/_docker_manifests.yml Switches internal cache/docker action references to $/ syntax.
.github/workflows/_build.yml Switches cache restore action to $/ syntax in build workflow.
.github/workflows/_artifacts_windows.yml Switches cache restore action to $/ syntax in Windows artifacts workflow.
.github/workflows/_artifacts_linux.yml Switches internal cache/docker action references to $/ syntax in Linux artifacts workflow.
.github/actionlint.yaml Adds temporary ignores for the two Actionlint diagnostics that don’t yet support $/.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[build] Use self-repository syntax for same-repository actions and workflows

2 participants