Commit 429699f
authored
BREAKING CHANGE: Require
Fixes
github/continuous-ai-for-accessibility#39
(Hubber access only)
It’s common for someone to scan one site, then edit their workflow to
scan a different site. When this happens, if `cache_key` is not
provided, the results of the second site’s scan overwrite the first’s.
To avoid data loss, this PR makes `cache_key` a required input.
Allowed characters are `A-Za-z0-9._/-`, so these are all valid example
`cache_key` values:
- `cached_findings-main`
- `cached_findings-github.com-main.json`
- `github.com/settings-pages/cached_findings.json` (this creates
directories)
`cache_key` doesn’t need to be a hardcoded string. It can be generated
in an earlier workflow step, e.g.:
```YAML
- name: Generate cache key
id: generate_cache_key
shell: bash
run: |
CACHE_KEY=$(printf 'cached_findings-%s-%s.json' "${{ matrix.id }}" "${{ github.ref_name }}" | tr -cs 'A-Za-z0-9._-' '_')
echo "cache_key=$CACHE_KEY" >> $GITHUB_OUTPUT
```cache_key input (#1792)2 files changed
+5
-15
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
96 | 96 | | |
97 | 97 | | |
98 | 98 | | |
99 | | - | |
| 99 | + | |
100 | 100 | | |
101 | 101 | | |
102 | 102 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
13 | 13 | | |
14 | 14 | | |
15 | 15 | | |
16 | | - | |
17 | | - | |
| 16 | + | |
| 17 | + | |
18 | 18 | | |
19 | 19 | | |
20 | 20 | | |
| |||
35 | 35 | | |
36 | 36 | | |
37 | 37 | | |
38 | | - | |
39 | | - | |
40 | | - | |
41 | | - | |
42 | | - | |
43 | | - | |
44 | | - | |
45 | | - | |
46 | | - | |
47 | | - | |
48 | 38 | | |
49 | 39 | | |
50 | 40 | | |
51 | 41 | | |
52 | | - | |
| 42 | + | |
53 | 43 | | |
54 | 44 | | |
55 | 45 | | |
| |||
84 | 74 | | |
85 | 75 | | |
86 | 76 | | |
87 | | - | |
| 77 | + | |
88 | 78 | | |
89 | 79 | | |
90 | 80 | | |
| |||
0 commit comments