Skip to content

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

Merged
arturcic merged 1 commit into
GitTools:mainfrom
arturcic:build/5103-self-repository-syntax
Aug 14, 2026
Merged

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

Conversation

@arturcic

@arturcic arturcic commented Jul 31, 2026

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.
  • Suppress Sonar rule githubactions:S7637 only on $/ references, which already resolve to the exact running commit.
  • Replace inherited reusable-workflow secrets with explicit least-privilege passing of OP_SERVICE_ACCOUNT_TOKEN where required.

Related Issue

Resolves #5103

Static-analysis Compatibility

Actionlint 1.7.12 does not yet recognize the $/ self-repository syntax. The temporary path-scoped ignores in .github/actionlint.yaml suppress only the two obsolete diagnostics while keeping all other lint checks active.

Native support is tracked by rhysd/actionlint#711. Remove the workaround once upstream support is released and used by this repository.

Sonar rule githubactions:S7637 likewise treats $/ references as unpinned external dependencies. Each self-reference carries a line-level NOSONAR explanation because adding an @ref would invalidate the self-repository syntax.

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 lite review requested due to automatic review settings August 1, 2026 20:51

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 $/.

@arturcic
arturcic force-pushed the build/5103-self-repository-syntax branch from 69319bf to 9e4c28e Compare August 14, 2026 09:29
@arturcic
arturcic marked this pull request as ready for review August 14, 2026 09:29
Copilot AI review requested due to automatic review settings August 14, 2026 09:29

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.

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

Copilot AI review requested due to automatic review settings August 14, 2026 09:34
@arturcic
arturcic force-pushed the build/5103-self-repository-syntax branch from 9e4c28e to 42bc570 Compare August 14, 2026 09:34

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.

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

Copilot AI review requested due to automatic review settings August 14, 2026 09:38
@arturcic
arturcic force-pushed the build/5103-self-repository-syntax branch from 42bc570 to 92a3b5b Compare August 14, 2026 09:38

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.

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

@sonarqubecloud

Copy link
Copy Markdown

@arturcic

Copy link
Copy Markdown
Member Author

@Mergifyio queue

@arturcic
arturcic merged commit 3ba9622 into GitTools:main Aug 14, 2026
58 checks passed
@arturcic
arturcic deleted the build/5103-self-repository-syntax branch August 14, 2026 10:09
@mergify

mergify Bot commented Aug 14, 2026

Copy link
Copy Markdown
Contributor

Merge Queue Status

  • 🟠 Waiting for queue conditions
  • ⏳ Enter queue
  • ⏳ Run checks
  • ⏳ Merge
Waiting for
  • -closed [📌 queue requirement]
  • check-success=Build & Test (new-cli)
  • check-success=DotNet Format
  • github-review-approved [🛡 GitHub repository ruleset rule main branch rule]
  • any of: [🛡 GitHub repository ruleset rule main branch rule]
    • check-neutral = @github-actions/DotNet Format
    • check-skipped = @github-actions/DotNet Format
    • check-success = @github-actions/DotNet Format
  • any of: [🛡 GitHub repository ruleset rule main branch rule]
    • check-neutral = @github-actions/Build & Test (new-cli)
    • check-skipped = @github-actions/Build & Test (new-cli)
    • check-success = @github-actions/Build & Test (new-cli)
All conditions
  • -closed [📌 queue requirement]
  • any of [🔀 queue conditions]:
    • all of [📌 queue conditions of queue rule default]:
      • check-success=Build & Test (new-cli)
      • check-success=DotNet Format
      • github-review-approved [🛡 GitHub repository ruleset rule main branch rule]
      • any of [🛡 GitHub repository ruleset rule main branch rule]:
        • check-neutral = @github-actions/DotNet Format
        • check-skipped = @github-actions/DotNet Format
        • check-success = @github-actions/DotNet Format
      • any of [🛡 GitHub repository ruleset rule main branch rule]:
        • check-neutral = @github-actions/Build & Test (new-cli)
        • check-skipped = @github-actions/Build & Test (new-cli)
        • check-success = @github-actions/Build & Test (new-cli)
      • check-success=Release
      • any of [🛡 GitHub repository ruleset rule main branch rule]:
        • check-success = @github-actions/Release
        • check-neutral = @github-actions/Release
        • check-skipped = @github-actions/Release
      • any of [🛡 GitHub repository ruleset rule main branch rule]:
        • check-success = @github-actions/Build & Package / macos-26
        • check-neutral = @github-actions/Build & Package / macos-26
        • check-skipped = @github-actions/Build & Package / macos-26
      • any of [🛡 GitHub repository ruleset rule main branch rule]:
        • check-success = @github-actions/Build & Package / ubuntu-24.04
        • check-neutral = @github-actions/Build & Package / ubuntu-24.04
        • check-skipped = @github-actions/Build & Package / ubuntu-24.04
      • any of [🛡 GitHub repository ruleset rule main branch rule]:
        • check-success = @github-actions/Build & Package / windows-2025-vs2026
        • check-neutral = @github-actions/Build & Package / windows-2025-vs2026
        • check-skipped = @github-actions/Build & Package / windows-2025-vs2026
      • any of [🛡 GitHub repository ruleset rule main branch rule]:
        • check-neutral = Mergify Merge Protections
        • check-skipped = Mergify Merge Protections
        • check-success = Mergify Merge Protections
      • any of [🛡 GitHub repository ruleset rule main branch rule]:
        • check-success = @sonarqubecloud/SonarCloud Code Analysis
        • check-neutral = @sonarqubecloud/SonarCloud Code Analysis
        • check-skipped = @sonarqubecloud/SonarCloud Code Analysis
      • any of [🛡 GitHub repository ruleset rule main branch rule]:
        • check-success = @github-actions/Test / macos-26 - net10.0 - libgit2
        • check-neutral = @github-actions/Test / macos-26 - net10.0 - libgit2
        • check-skipped = @github-actions/Test / macos-26 - net10.0 - libgit2
      • any of [🛡 GitHub repository ruleset rule main branch rule]:
        • check-success = @github-actions/Test / macos-26 - net10.0 - managed
        • check-neutral = @github-actions/Test / macos-26 - net10.0 - managed
        • check-skipped = @github-actions/Test / macos-26 - net10.0 - managed
      • any of [🛡 GitHub repository ruleset rule main branch rule]:
        • check-success = @github-actions/Test / ubuntu-24.04 - net10.0 - libgit2
        • check-neutral = @github-actions/Test / ubuntu-24.04 - net10.0 - libgit2
        • check-skipped = @github-actions/Test / ubuntu-24.04 - net10.0 - libgit2
      • any of [🛡 GitHub repository ruleset rule main branch rule]:
        • check-success = @github-actions/Test / ubuntu-24.04 - net10.0 - managed
        • check-neutral = @github-actions/Test / ubuntu-24.04 - net10.0 - managed
        • check-skipped = @github-actions/Test / ubuntu-24.04 - net10.0 - managed
      • any of [🛡 GitHub repository ruleset rule main branch rule]:
        • check-success = @github-actions/Test / windows-2025-vs2026 - net10.0 - libgit2
        • check-neutral = @github-actions/Test / windows-2025-vs2026 - net10.0 - libgit2
        • check-skipped = @github-actions/Test / windows-2025-vs2026 - net10.0 - libgit2
      • any of [🛡 GitHub repository ruleset rule main branch rule]:
        • check-success = @github-actions/Test / windows-2025-vs2026 - net10.0 - managed
        • check-neutral = @github-actions/Test / windows-2025-vs2026 - net10.0 - managed
        • check-skipped = @github-actions/Test / windows-2025-vs2026 - net10.0 - managed
  • -conflict [📌 queue requirement]
  • -draft [📌 queue requirement]
  • any of [📌 queue -> configuration change requirements]:
    • -mergify-configuration-changed
    • check-success = Configuration changed
  • any of [📌 queue requirement]:
    • check-neutral = Mergify Merge Protections
    • check-skipped = Mergify Merge Protections
    • check-success = Mergify Merge Protections

@mergify

mergify Bot commented Aug 14, 2026

Copy link
Copy Markdown
Contributor

Thank you @arturcic for your contribution!

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