Commit 472bf85
authored
feat: Use relative paths to reference sub-actions in composite actions (#59)
Fixes
github/continuous-ai-for-accessibility#87
(Hubber access only)
Fixes
github/continuous-ai-for-accessibility#81
(Hubber access only)
### Problem
`uses: github/accessibility-scanner@main` currently fails with the
following error—
> Error: Can't find 'action.yml', 'action.yaml' or 'Dockerfile' under
'/home/runner/work/accessibility-sandbox/accessibility-sandbox/.github/actions/gh-cache/cache'.
Did you forget to run actions/checkout before running your local action?
—this PR makes it work.
### Solution
This PR basically moves the preparatory `cp` workflow step [we used to
require](https://github.com/github/accessibility-scanner/tree/bc0c7650825e578c243347fe551f247826bcb70e?tab=readme-ov-file#1-add-a-workflow-file)
into the composite action(s) itself.
This PR is a superior alternative to
c262469:
1. It restores our ability to merge `main` directly into `v2`, which
simplifies backports (e.g. dependency updates that Dependabot opens for
`main`).
2. It means referencing a point release (e.g. `uses:
github/[email protected]`) _only_ runs code from that release
(rather than a mix of `v2.4.0` and (newer) `v2` code).
### Testing
- I tested using `uses:
github/accessibility-scanner@smockle/restore-relative-paths`, and it
worked:
https://github.com/github/accessibility-sandbox/actions/runs/18943849865
(Hubber access only)
- I tested using a sub-action directly (e.g. `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)
- The “Test” CI check passed:
https://github.com/github/accessibility-scanner/actions/runs/18944419202/job/54092648187?pr=592 files changed
+23
-9
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
14 | 14 | | |
15 | 15 | | |
16 | 16 | | |
17 | | - | |
| 17 | + | |
18 | 18 | | |
19 | 19 | | |
20 | 20 | | |
| |||
24 | 24 | | |
25 | 25 | | |
26 | 26 | | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
27 | 34 | | |
28 | | - | |
| 35 | + | |
29 | 36 | | |
30 | 37 | | |
31 | 38 | | |
| |||
41 | 48 | | |
42 | 49 | | |
43 | 50 | | |
44 | | - | |
| 51 | + | |
45 | 52 | | |
46 | 53 | | |
47 | 54 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
40 | 40 | | |
41 | 41 | | |
42 | 42 | | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
43 | 50 | | |
44 | 51 | | |
45 | | - | |
| 52 | + | |
46 | 53 | | |
47 | 54 | | |
48 | 55 | | |
| |||
59 | 66 | | |
60 | 67 | | |
61 | 68 | | |
62 | | - | |
| 69 | + | |
63 | 70 | | |
64 | 71 | | |
65 | 72 | | |
66 | 73 | | |
67 | 74 | | |
68 | 75 | | |
69 | | - | |
| 76 | + | |
70 | 77 | | |
71 | 78 | | |
72 | 79 | | |
73 | 80 | | |
74 | 81 | | |
75 | | - | |
| 82 | + | |
76 | 83 | | |
77 | 84 | | |
78 | 85 | | |
| |||
89 | 96 | | |
90 | 97 | | |
91 | 98 | | |
92 | | - | |
| 99 | + | |
93 | 100 | | |
94 | 101 | | |
95 | 102 | | |
| |||
119 | 126 | | |
120 | 127 | | |
121 | 128 | | |
122 | | - | |
| 129 | + | |
123 | 130 | | |
124 | 131 | | |
125 | 132 | | |
| |||
0 commit comments