Skip to content

Commit e879f9c

Browse files
committed
feat: Restore relative paths to sub-actions in composite actions’ 'uses'. This commit’s approach _should_ make the action runnable with 'uses: github/accessibility-scanner@main', without 'action not found at path'-type errors.
1 parent 57e18e4 commit e879f9c

File tree

2 files changed

+17
-9
lines changed

2 files changed

+17
-9
lines changed

.github/actions/gh-cache/cache/action.yml

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ inputs:
1414
fail_on_cache_miss:
1515
description: "Fail the workflow if cached item is not found."
1616
required: false
17-
default: 'false'
17+
default: "false"
1818

1919
outputs:
2020
value:
@@ -24,8 +24,12 @@ outputs:
2424
runs:
2525
using: "composite"
2626
steps:
27+
- name: Make sub-actions referenceable
28+
working-directory: ${{ github.action_path }}
29+
shell: bash
30+
run: cp -Rf $(realpath ../) /home/runner/work/_actions/current
2731
- name: Restore cached value
28-
uses: ./.github/actions/gh-cache/restore
32+
uses: ./../../_actions/current/.github/actions/gh-cache/restore
2933
with:
3034
path: ${{ inputs.key }}
3135
token: ${{ inputs.token }}
@@ -41,7 +45,7 @@ runs:
4145
4246
- if: ${{ inputs.value }}
4347
name: Save cached value
44-
uses: ./.github/actions/gh-cache/save
48+
uses: ./../../_actions/current/.github/actions/gh-cache/save
4549
with:
4650
path: ${{ inputs.key }}
4751
token: ${{ inputs.token }}

action.yml

Lines changed: 10 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -40,9 +40,13 @@ outputs:
4040
runs:
4141
using: "composite"
4242
steps:
43+
- name: Make sub-actions referenceable
44+
working-directory: ${{ github.action_path }}
45+
shell: bash
46+
run: cp -Rf $(realpath ../) /home/runner/work/_actions/current
4347
- name: Restore cached results
4448
id: restore
45-
uses: ./.github/actions/gh-cache/cache
49+
uses: ./../../_actions/current/.github/actions/gh-cache/cache
4650
with:
4751
key: ${{ inputs.cache_key }}
4852
token: ${{ inputs.token }}
@@ -59,20 +63,20 @@ runs:
5963
- if: ${{ inputs.login_url && inputs.username && inputs.password && !inputs.auth_context }}
6064
name: Authenticate
6165
id: auth
62-
uses: ./.github/actions/auth
66+
uses: ./../../_actions/current/.github/actions/auth
6367
with:
6468
login_url: ${{ inputs.login_url }}
6569
username: ${{ inputs.username }}
6670
password: ${{ inputs.password }}
6771
- name: Find
6872
id: find
69-
uses: ./.github/actions/find
73+
uses: ./../../_actions/current/.github/actions/find
7074
with:
7175
urls: ${{ inputs.urls }}
7276
auth_context: ${{ inputs.auth_context || steps.auth.outputs.auth_context }}
7377
- name: File
7478
id: file
75-
uses: ./.github/actions/file
79+
uses: ./../../_actions/current/.github/actions/file
7680
with:
7781
findings: ${{ steps.find.outputs.findings }}
7882
repository: ${{ inputs.repository }}
@@ -89,7 +93,7 @@ runs:
8993
- if: ${{ inputs.skip_copilot_assignment != 'true' }}
9094
name: Fix
9195
id: fix
92-
uses: ./.github/actions/fix
96+
uses: ./../../_actions/current/.github/actions/fix
9397
with:
9498
issues: ${{ steps.get_issues_from_filings.outputs.issues }}
9599
repository: ${{ inputs.repository }}
@@ -119,7 +123,7 @@ runs:
119123
FILINGS: ${{ steps.file.outputs.filings }}
120124
FIXINGS: ${{ steps.fix.outputs.fixings }}
121125
- name: Save cached results
122-
uses: ./.github/actions/gh-cache/cache
126+
uses: ./../../_actions/current/.github/actions/gh-cache/cache
123127
with:
124128
key: ${{ inputs.cache_key }}
125129
value: ${{ steps.results.outputs.results }}

0 commit comments

Comments
 (0)