Skip to content

fix(workflows): replace relative reusable paths with full org/repo refs#35

Merged
YiWang24 merged 2 commits into
mainfrom
fix/reusable-workflow-paths
May 4, 2026
Merged

fix(workflows): replace relative reusable paths with full org/repo refs#35
YiWang24 merged 2 commits into
mainfrom
fix/reusable-workflow-paths

Conversation

@YiWang24

@YiWang24 YiWang24 commented May 4, 2026

Copy link
Copy Markdown
Collaborator

Summary

  • GitHub Actions does not support the ./ relative path syntax for reusable workflows in subdirectories (reusable/)
  • All 16 uses: ./.github/workflows/reusable/*.yml references replaced with uses: YiAgent/OpenCI/.github/workflows/reusable/*.yml@<SHA> (manifest-pinned SHA)
  • Two BATS routing tests updated to match the new full-path format
  • One pre-existing SC2016 shellcheck false positive suppressed (intentional grep BRE syntax)

Root Cause

GitHub's workflow parser rejects uses: ./.github/workflows/reusable/xxx.yml when the workflow is in a subdirectory, returning:

failed to parse workflow: invalid value workflow reference: workflows must be defined at the top level of the .github/workflows/ directory

This caused all affected workflows to display as file paths (.github/workflows/ci.yml) instead of their name: field values in the GitHub Actions UI.

Test Plan

  • All pre-commit hooks pass (YAML lint, forbid-unpinned-actions, secrets scan)
  • All pre-push hooks pass (actionlint, shellcheck, yamllint, verify-sha, 578 BATS tests)
  • Verify workflow names display correctly in GitHub Actions sidebar after merge

View in Codesmith
Need help on this PR? Tag @codesmith with what you need.

  • Let Codesmith autofix CI failures and bot reviews

Summary by CodeRabbit

  • Chores
    • Migrated CI/CD pipeline workflows to use upstream YiAgent/OpenCI reusable workflows pinned to commit d280a64 across all pipeline stages (agent, CI, deployments, documentation, issue operations, observability, and release).
    • Updated tests to reflect new workflow references.

YiWang24 added 2 commits May 3, 2026 20:53
GitHub Actions does not support the ./ relative path syntax for
reusable workflows in subdirectories. Replaced all uses of
./.github/workflows/reusable/*.yml with the full
YiAgent/OpenCI/.github/workflows/reusable/*.yml@SHA format,
which supports subdirectory paths and is valid per GitHub docs.

This fixes the broken workflow names (showing file paths instead
of name: field values) and the workflow dispatch failures.
Switch from HEAD SHA to manifest-pinned SHA d280a64 for all
YiAgent/OpenCI reusable workflow references, matching the
verify-sha hook requirement. Also update two BATS tests that
asserted the old ./ relative path pattern, and suppress a
SC2016 false positive where $ is intentional grep BRE syntax.
@qodo-code-review

Copy link
Copy Markdown
ⓘ You've reached your Qodo monthly free-tier limit. Reviews pause until next month — upgrade your plan to continue now, or link your paid account if you already have one.

@coderabbitai

coderabbitai Bot commented May 4, 2026

Copy link
Copy Markdown

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro Plus

Run ID: b0dbf4b4-1692-4d33-a01c-e444a7861191

📥 Commits

Reviewing files that changed from the base of the PR and between e166800 and 8b21871.

📒 Files selected for processing (12)
  • .github/workflows/agent.yml
  • .github/workflows/ci.yml
  • .github/workflows/dependencies.yml
  • .github/workflows/deploy.yml
  • .github/workflows/docs.yml
  • .github/workflows/issue-ops.yml
  • .github/workflows/observability.yml
  • .github/workflows/on-maintenance.yml
  • .github/workflows/pull-request.yml
  • .github/workflows/release.yml
  • tests/actions/on-issue-routing.bats
  • tests/actions/on-pr-routing.bats

📝 Walkthrough

Walkthrough

All local reusable workflow references across nine GitHub Actions workflows are switched to externally maintained workflows from the YiAgent/OpenCI repository, pinned to commit d280a64a392b7f1a3e906246286ca983e610f920. Corresponding test assertions are updated to expect the new external workflow references.

Changes

Reusable Workflow Externalization

Layer / File(s) Summary
Workflow Configuration
.github/workflows/agent.yml, ci.yml, dependencies.yml, deploy.yml, docs.yml, issue-ops.yml, observability.yml, on-maintenance.yml, pull-request.yml, release.yml
All uses: references in workflow jobs are updated from local relative paths (./.github/workflows/reusable/<name>.yml) to external pinned references (YiAgent/OpenCI/.github/workflows/reusable/<name>.yml@d280a64a392b7f1a3e906246286ca983e610f920). Job inputs and secrets inheritance remain unchanged across all workflows.
Test Assertions
tests/actions/on-issue-routing.bats, on-pr-routing.bats
Test assertions updated to match the new external workflow references. Shellcheck suppression comment added for dynamic input forwarding validation.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~18 minutes

Possibly related PRs

Poem

🐰 Local paths now roam afar,
Pinned commits guide our northern star,
Workflows dance in harmony true,
External, yet forever in view!

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title accurately summarizes the main change: replacing local relative reusable workflow paths with full external org/repo references pinned to a commit SHA across 16 workflow files and 2 test files.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch fix/reusable-workflow-paths

Review rate limit: 9/10 reviews remaining, refill in 6 minutes.

Comment @coderabbitai help to get the list of available commands and usage tips.

@sonarqubecloud

sonarqubecloud Bot commented May 4, 2026

Copy link
Copy Markdown

@YiWang24 YiWang24 merged commit 623b74c into main May 4, 2026
11 checks passed
This was referenced May 4, 2026
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.

1 participant