Commit 6005ecf
committed
fix: parse registry_info CLI output without shell expansion
The previous registry_info.sh ran `echo $REGISTRY_INFO > registry_info.env`
followed by `source registry_info.env`, both of which re-expand any `$` in
the value. Harbor robot usernames are `robot$<project>+push`, so
`$<project>` was being treated as an unset shell variable and dropped,
leaving `robot-<rest>+push` — which Harbor rejects with 401 at docker
login.
Read each KEY=VALUE pair via `read -r`, which preserves the literal `$`,
and set the env vars from the captured variables.
Also convert actions/utils/registry_info/action.yml from a docker action
to a composite action, so the fixed script in this branch is used at run
time instead of the version baked into the published image.1 parent 72357c6 commit 6005ecf
2 files changed
Lines changed: 39 additions & 5 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
11 | 11 | | |
12 | 12 | | |
13 | 13 | | |
14 | | - | |
15 | | - | |
16 | | - | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
15 | 15 | | |
16 | 16 | | |
17 | 17 | | |
18 | | - | |
19 | | - | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
20 | 35 | | |
21 | 36 | | |
22 | 37 | | |
| |||
0 commit comments