Skip to content
13 changes: 10 additions & 3 deletions .github/actions/gh-cache/cache/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ inputs:
fail_on_cache_miss:
description: "Fail the workflow if cached item is not found."
required: false
default: 'false'
default: "false"

outputs:
value:
Expand All @@ -24,8 +24,15 @@ outputs:
runs:
using: "composite"
steps:
- name: Make sub-actions referenceable
working-directory: ${{ github.action_path }}
shell: bash
run: |
mkdir -p /home/runner/work/_actions/current/.github/actions
rsync -a ../../../../.github/actions/ /home/runner/work/_actions/current/.github/actions/
Comment on lines +31 to +32
Copy link

Copilot AI Oct 30, 2025

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.

Copilot uses AI. Check for mistakes.
ls -ltra /home/runner/work/_actions/current/.github/actions
- name: Restore cached value
uses: ./.github/actions/gh-cache/restore
uses: ./../../_actions/current/.github/actions/gh-cache/restore
with:
path: ${{ inputs.key }}
token: ${{ inputs.token }}
Expand All @@ -41,7 +48,7 @@ runs:

- if: ${{ inputs.value }}
name: Save cached value
uses: ./.github/actions/gh-cache/save
uses: ./../../_actions/current/.github/actions/gh-cache/save
with:
path: ${{ inputs.key }}
token: ${{ inputs.token }}
Expand Down
19 changes: 13 additions & 6 deletions action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -40,9 +40,16 @@ outputs:
runs:
using: "composite"
steps:
- name: Make sub-actions referenceable
working-directory: ${{ github.action_path }}
shell: bash
run: |
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
Comment on lines +47 to +49
Copy link

Copilot AI Oct 30, 2025

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.

Suggested change
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"

Copilot uses AI. Check for mistakes.
- name: Restore cached results
id: restore
uses: ./.github/actions/gh-cache/cache
uses: ./../../_actions/current/.github/actions/gh-cache/cache
with:
key: ${{ inputs.cache_key }}
token: ${{ inputs.token }}
Expand All @@ -59,20 +66,20 @@ runs:
- if: ${{ inputs.login_url && inputs.username && inputs.password && !inputs.auth_context }}
name: Authenticate
id: auth
uses: ./.github/actions/auth
uses: ./../../_actions/current/.github/actions/auth
with:
login_url: ${{ inputs.login_url }}
username: ${{ inputs.username }}
password: ${{ inputs.password }}
- name: Find
id: find
uses: ./.github/actions/find
uses: ./../../_actions/current/.github/actions/find
with:
urls: ${{ inputs.urls }}
auth_context: ${{ inputs.auth_context || steps.auth.outputs.auth_context }}
- name: File
id: file
uses: ./.github/actions/file
uses: ./../../_actions/current/.github/actions/file
with:
findings: ${{ steps.find.outputs.findings }}
repository: ${{ inputs.repository }}
Expand All @@ -89,7 +96,7 @@ runs:
- if: ${{ inputs.skip_copilot_assignment != 'true' }}
name: Fix
id: fix
uses: ./.github/actions/fix
uses: ./../../_actions/current/.github/actions/fix
with:
issues: ${{ steps.get_issues_from_filings.outputs.issues }}
repository: ${{ inputs.repository }}
Expand Down Expand Up @@ -119,7 +126,7 @@ runs:
FILINGS: ${{ steps.file.outputs.filings }}
FIXINGS: ${{ steps.fix.outputs.fixings }}
- name: Save cached results
uses: ./.github/actions/gh-cache/cache
uses: ./../../_actions/current/.github/actions/gh-cache/cache
with:
key: ${{ inputs.cache_key }}
value: ${{ steps.results.outputs.results }}
Expand Down