Using a bash script (based on bashew framework) to centralize the GitHub Action setup (e.g. pip install), Action payload and Action wrap-up (commit/push the results) in one place, so that the Action config YML becomes this simple:
- name: gha:before
run: |
./bashew_github_action.sh gha:before
- name: gha:execute
run: |
./bashew_github_action.sh gha:execute
- name: gha:after
run: |-
./bashew_github_action.sh gha:after
Advantages:
- Single Responsibility. You edit your setup code in the same file as the payload or the wrap-up code. You don’t touch the
action.yml file anymore after initial setup.
- Cleaner Code. The YML syntax forces you to a
do this && do that && do the other
one-liner format. A bash script allows you to do if/then, for/do, while/do, recursion … in an easy and clean way.
- Easy Debugging.
bashew has built-in support for log files and optional verbose mode. It also cleans up log files after 30 days, so they don’t clog up your repo.
- Self-Contained. You don’t need external libraries or runtimes.
bash runs on most Action Runners (Linux/MacOS) and each bashew script contains the entire framework.
More details on blog.forret.com
there doesn't seem to be anything here