- 
                Notifications
    
You must be signed in to change notification settings  - Fork 12
 
feat: Use relative paths to reference sub-actions in composite actions #59
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
…es'. This commit’s approach _should_ make the action runnable with 'uses: github/accessibility-scanner@main', without 'action not found at path'-type errors.
…d dest are identical (not copied)'
There was a problem hiding this 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 refactors the action reference mechanism to enable nested composite actions to reference sub-actions. Instead of using relative paths like ./.github/actions/..., the actions are now copied to a centralized location (/home/runner/work/_actions/current/.github/actions/) and referenced via ./../../_actions/current/.github/actions/....
- Added setup steps to copy sub-actions to a centralized location using 
rsync - Updated all action references from relative 
./.github/actions/paths to./../../_actions/current/.github/actions/ - Changed quote style for consistency in one default value
 
Reviewed Changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 5 comments.
| File | Description | 
|---|---|
| action.yml | Added sub-action setup step and updated all 6 action references to use the centralized path | 
| .github/actions/gh-cache/cache/action.yml | Added sub-action setup step and updated 2 action references, plus a quote style consistency fix | 
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| mkdir -p /home/runner/work/_actions/current/.github/actions | ||
| rsync -a .github/actions/ /home/runner/work/_actions/current/.github/actions/ | ||
| ls -ltra /home/runner/work/_actions/current/.github/actions | 
    
      
    
      Copilot
AI
    
    
    
      Oct 30, 2025 
    
  
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The hardcoded absolute path /home/runner/work/_actions/current/ assumes a specific runner directory structure that may not be portable across different environments or runner types (e.g., self-hosted runners). Consider using a relative path or environment variable like $RUNNER_TEMP to make this more portable.
| mkdir -p /home/runner/work/_actions/current/.github/actions | |
| rsync -a .github/actions/ /home/runner/work/_actions/current/.github/actions/ | |
| ls -ltra /home/runner/work/_actions/current/.github/actions | |
| mkdir -p "${{ github.action_path }}/.github/actions" | |
| rsync -a .github/actions/ "${{ github.action_path }}/.github/actions/" | |
| ls -ltra "${{ github.action_path }}/.github/actions" | 
| mkdir -p /home/runner/work/_actions/current/.github/actions | ||
| rsync -a ../../../../.github/actions/ /home/runner/work/_actions/current/.github/actions/ | 
    
      
    
      Copilot
AI
    
    
    
      Oct 30, 2025 
    
  
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The hardcoded absolute path /home/runner/work/_actions/current/ assumes a specific runner directory structure that may not be portable across different environments or runner types (e.g., self-hosted runners). Consider using a relative path or environment variable like $RUNNER_TEMP to make this more portable.
Fixes https://github.com/github/continuous-ai-for-accessibility/issues/87 (Hubber access only)
Fixes https://github.com/github/continuous-ai-for-accessibility/issues/81 (Hubber access only)
Problem
uses: github/accessibility-scanner@maincurrently fails with the following error——this PR makes it work.
Solution
This PR basically moves the preparatory
cpworkflow step we used to require into the composite action(s) itself.This PR is a superior alternative to c262469:
maindirectly intov2, which simplifies backports (e.g. dependency updates that Dependabot opens formain).uses: github/[email protected]) only runs code from that release (rather than a mix ofv2.4.0and (newer)v2code).Testing
uses: github/accessibility-scanner@smockle/restore-relative-paths, and it worked: https://github.com/github/accessibility-sandbox/actions/runs/18943849865 (Hubber access only)uses: github/accessibility-scanner/.github/actions/gh-cache/cache@smockle/restore-relative-paths), and it worked: https://github.com/github/accessibility-sandbox/actions/runs/18945624950 (Hubber access only)