2022-12-26 06:17:13 +03:00
|
|
|
name: Lint
|
|
|
|
|
|
|
|
on:
|
|
|
|
push:
|
|
|
|
branches:
|
2023-01-28 03:18:02 +03:00
|
|
|
- develop
|
2022-12-26 06:17:13 +03:00
|
|
|
paths:
|
|
|
|
- '**.sh'
|
|
|
|
pull_request:
|
|
|
|
branches:
|
2023-01-28 03:18:02 +03:00
|
|
|
- develop
|
2022-12-26 06:17:13 +03:00
|
|
|
paths:
|
|
|
|
- '**.sh'
|
|
|
|
|
|
|
|
jobs:
|
|
|
|
shellcheck:
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
env:
|
|
|
|
LANG: C.UTF-8
|
|
|
|
container:
|
2023-12-20 19:01:40 +03:00
|
|
|
image: docker.io/ubuntu:24.04
|
2022-12-26 06:17:13 +03:00
|
|
|
steps:
|
2024-09-05 23:50:59 +03:00
|
|
|
- name: Check out pull request code
|
|
|
|
uses: actions/checkout@v4
|
|
|
|
if: github.event_name == 'pull_request'
|
|
|
|
with:
|
|
|
|
repository: ${{ github.event.pull_request.head.repo.full_name }}
|
|
|
|
|
|
|
|
- name: Check out repository code
|
|
|
|
uses: actions/checkout@v4
|
|
|
|
if: github.event_name == 'push'
|
2022-12-26 06:17:13 +03:00
|
|
|
|
|
|
|
- name: Install shellcheck
|
|
|
|
run: apt update && apt install -y shellcheck bash && shellcheck --version
|
|
|
|
|
|
|
|
- name: Check shell scripts
|
2023-01-11 05:50:32 +03:00
|
|
|
run: shopt -s globstar && ls **/*.sh && shellcheck -x -P "SCRIPTDIR" --severity=info **/*.sh
|
2022-12-26 06:17:13 +03:00
|
|
|
shell: bash
|