Conversation
1b8eab1 to
a12c271
Compare
.github/actions/spelling/allow.txt
Outdated
| @@ -1,4 +1,5 @@ | |||
| emoji | |||
| esc'd | |||
There was a problem hiding this comment.
I'm still working on properly fixing it -- I've added some initial code to help with this and will write a test (but probably not today)
There was a problem hiding this comment.
Since the actual use site is dumb, I'm going to fix this in #10122 too.
.github/actions/spelling/config.json
Outdated
| @@ -0,0 +1,29 @@ | |||
| { | |||
There was a problem hiding this comment.
This file can contain configuration as long as it's delegated by $INPUTS via load-config-from.pr-base-keys.
| sudo apt-get update | ||
| sudo apt-get install -y cpanminus |
There was a problem hiding this comment.
- This is enables
actto run check-spelling per https://gitea.com/actions-oss/act-cli/issues/32#issuecomment-1075706
(DOCKER_HOST=unix:///Users/$USER/.rd/docker.sock act --container-daemon-socket - -j spelling 2>&1)
There was a problem hiding this comment.
Ah, they don't have the equivalent of DEBIAN_FRONTEND=noninteractive set (and whatever else that causes auto-detect to fall over)? Having that actually in the commit message would be nice, but that's sort of cherry on top here.
There was a problem hiding this comment.
I'm not sure what's going on, they do technically have:
$ docker run ghcr.io/catthehacker/ubuntu:act-latest env |grep DEBIAN
DEBIAN_FRONTEND=noninteractiveThere was a problem hiding this comment.
- I've left a ticket for this specifically and a note that
DEBIAN_FRONTENDdoesn't appear to be the right magic: https://gitea.com/actions-oss/act-cli/issues/36#issuecomment-1146420
Maybe @ChristopherHX has a better guess...
There was a problem hiding this comment.
Could be that act runs docker commands via a tty, so some programs might make different assumptions.
Disabling the tty in act source code could be tried, some programs might disable their color output.
EDIT Or sudo is configured to preserve this env or due to missing tty actions/runner do not need -y, a lot of things could happen.
EDIT2 Our image could also set this: https://stackoverflow.com/questions/70236670/debian-frontend-noninteractive-not-working-inside-shell-script-with-apt-get the Question mentioned an command to set this in apt settings file instead of env
There was a problem hiding this comment.
fwiw, I tried:
echo 'debconf debconf/frontend select Noninteractive' | sudo debconf-set-selections
sudo apt-get install cpanminus
And that resulted in:
[Check Spelling/Check Spelling] | Do you want to continue? [Y/n] Abort.
[Check Spelling/Check Spelling] ❌ Failure - Main install cpanminus
[Check Spelling/Check Spelling] exitcode '1': failure
[Check Spelling/Check Spelling] ⭐ Run Complete job
[Check Spelling/Check Spelling] ✅ Success - Complete job
[Check Spelling/Check Spelling] 🏁 Job failed
Error: job 'Check Spelling' failed
The reason this works on github is:
/etc/apt/apt.conf.d/90assumeyes has:
APT::Get::Assume-Yes "true";
See the apt artifact in https://github.com/check-spelling-sandbox/urban-train-refactored-chainsaw/actions/runs/24245952527
I'll file a PR against the act runner images repo...
| git clone --branch "$version" --depth 1 "$repo" "$checkout" >&2 | ||
| git -c advice.detachedHead=false clone --branch "$version" --depth 1 "$repo" "$checkout" >&2 | ||
| else | ||
| git -C "$checkout" fetch origin "$version" >&2 | ||
| git -C "$checkout" checkout "$version" >&2 | ||
| git -c advice.detachedHead=false -C "$checkout" checkout "$version" >&2 |
There was a problem hiding this comment.
This reduces some noise at the start.
| sudo apt-get update | ||
| sudo apt-get install -y cpanminus |
There was a problem hiding this comment.
Ah, they don't have the equivalent of DEBIAN_FRONTEND=noninteractive set (and whatever else that causes auto-detect to fall over)? Having that actually in the commit message would be nice, but that's sort of cherry on top here.
a12c271 to
1d58bfa
Compare
mook-as
left a comment
There was a problem hiding this comment.
LGTM, thanks for the changes!
.github/actions/spelling/allow.txt
Outdated
| @@ -1,4 +1,5 @@ | |||
| emoji | |||
| esc'd | |||
There was a problem hiding this comment.
Since the actual use site is dumb, I'm going to fix this in #10122 too.
For unknown reasons, apt-get's detection fails to detmine that the terminal is noninteractive: - https://gitea.com/actions-oss/act-cli/issues/36 Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com>
Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com>
Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com>
Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com>
Roughly: https://github.com/check-spelling/spell-check-this/tree/976261d7b7184b67231c8668f2b35438496ca44f Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com>
1d58bfa to
d68953e
Compare
This takes advantage of a new feature in v0.0.26: config.json for defining configuration using json instead of in workflows.