News for hackers. Stuff that matters.
Re:The Pain That Is GitHub Actions by forrestthewoods on Thursday March 20, 2025 @03:39AM (#43420577)
> pipelines can run locally on a developer machine as well (as much as possible at least)

Facts.

However I’ll go a step further and say “only implement your logic in a tool that has a debugger”.

YAML is the worse. But shell scripts are second worst. Use a real language.

Re:The Pain That Is GitHub Actions by never_inline on Thursday March 20, 2025 @08:22AM (#43422142)
Python with click and PyYAML can go a long way - then you can build it as a CLI application and use the same from CI. In a java shop, picocli + graalvm probably. I wouldn't like Go for this purpose (against the conventional wisdom - because boilerplate and pretty bad debugging capabilities).

That said, if you absolutely need to use shell script for reasons, keep it all in single script, define logging functions including debug logs, rigorously check every constraint and variable, use shellcheck, factor the code well into functions - I should sometimes write a blog post about it.

Re:The Pain That Is GitHub Actions by folmar on Thursday March 20, 2025 @01:36PM (#43426279)
There is a debugger for bash: https://github.com/Trepan-Debuggers/bashdb Not that I'm recommending 10k-line programs in bash, but a debugger is useful when you need it.
Re:The Pain That Is GitHub Actions by sgarland on Thursday March 20, 2025 @07:37PM (#43430282)
Shell is a very real language, and it has a debugger; it’s called set -x and/or strace.
Re:The Pain That Is GitHub Actions by forrestthewoods on Friday March 21, 2025 @08:25PM (#43442142)
Like I said, use something with a real debugger.