diff --git a/.github/workflows/python.yml b/.github/workflows/python.yml new file mode 100644 index 0000000..ebedd59 --- /dev/null +++ b/.github/workflows/python.yml @@ -0,0 +1,18 @@ +name: Black (Python) +on: + push: + pull_request: + branches: + - main + +jobs: + black: + name: Black + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v3 + - name: Check Black formatting for Python scripts + uses: psf/black@stable + with: + options: --check --verbose + src: . diff --git a/.github/workflows/lint.yml b/.github/workflows/shell.yml similarity index 58% rename from .github/workflows/lint.yml rename to .github/workflows/shell.yml index 754ddd5..19953e9 100644 --- a/.github/workflows/lint.yml +++ b/.github/workflows/shell.yml @@ -1,4 +1,4 @@ -name: Lint +name: ShellCheck on: push: pull_request: @@ -6,20 +6,15 @@ on: - main jobs: - lint: - name: Lint + shellcheck: + name: ShellCheck runs-on: ubuntu-latest steps: - uses: actions/checkout@v3 - - name: Run ShellCheck + - name: Run ShellCheck for shell scripts uses: ludeeus/action-shellcheck@master with: severity: style scandir: . format: gcc version: stable - - name: Black formatting (Python) - uses: psf/black@stable - with: - options: --check --verbose - src: . diff --git a/README.md b/README.md index 90eba7c..78b00e1 100644 --- a/README.md +++ b/README.md @@ -2,6 +2,9 @@ Miscellaneous scripts for different purposes. Mostly unrelated to each other. +![ShellCheck](https://github.com/oh2fih/Misc-Scripts/workflows/ShellCheck/badge.svg) +![Black (Python)](https://github.com/oh2fih/Misc-Scripts/workflows/Black%20(Python)/badge.svg) + | Category | Script & Language | Purpose & Usage | |:---|:---|:---| | Email | [`mail-prepender.sh`](bin/mail-prepender.sh)
Shell (bash) | Prepends (to stdin/stdout) email header strings given in as flags `i`, `I`, `a`, or `A`; after possible mbox `From` & `Return-Path` header lines. Intended as a limited `formail` replacement that ignores the nyanses of the flags and simply prepends the valid (RFC 5322, 2.2) non-empty headers keeping the other headers as is. Flags `x` & `X` are implemented. Any other flags are ignored. |