go-teeworlds-protocol/.github/workflows/shell.yml

28 lines
659 B
YAML

name: Shell
on:
push:
branches: [ "master" ]
pull_request:
branches: [ "master" ]
jobs:
bash:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Prepare
run: |
sudo apt-get update -y
sudo apt-get install shellcheck
mkdir -p ~/.local/bin/
wget -O ~/.local/bin/shfmt https://github.com/mvdan/sh/releases/download/v3.8.0/shfmt_v3.8.0_linux_amd64
chmod +x ~/.local/bin/shfmt
- name: Shellcheck
run: find . -type f -name '*.sh' -print0 | xargs -0 shellcheck
- name: Shell format (shfmt)
run: find . -type f -name '*.sh' -print0 | xargs -0 shfmt -d