2022-02-07 01:41:39 +03:00
|
|
|
#
|
2023-01-05 03:58:29 +03:00
|
|
|
# Copyright (C) 2020-2023 Lin Song <linsongui@gmail.com>
|
2022-02-07 01:41:39 +03:00
|
|
|
#
|
|
|
|
# This work is licensed under the Creative Commons Attribution-ShareAlike 3.0
|
|
|
|
# Unported License: http://creativecommons.org/licenses/by-sa/3.0/
|
|
|
|
#
|
|
|
|
# Attribution required: please include my name in any derivative and let me
|
|
|
|
# know how you have improved it!
|
|
|
|
|
|
|
|
name: shellcheck
|
|
|
|
|
|
|
|
on: workflow_call
|
|
|
|
|
|
|
|
jobs:
|
|
|
|
shellcheck:
|
|
|
|
runs-on: ubuntu-20.04
|
|
|
|
if: github.repository_owner == 'hwdsl2'
|
|
|
|
steps:
|
2022-10-14 09:24:39 +03:00
|
|
|
- uses: actions/checkout@93ea575cb5d8a053eaa0ac8fa3b40d7e05a33cc8 # 3.1.0
|
2022-02-07 01:41:39 +03:00
|
|
|
with:
|
|
|
|
persist-credentials: false
|
|
|
|
- name: Check
|
|
|
|
run: |
|
|
|
|
if [ ! -x /usr/bin/shellcheck ]; then
|
|
|
|
export DEBIAN_FRONTEND=noninteractive
|
|
|
|
sudo apt-get -yqq update
|
|
|
|
sudo apt-get -yqq install shellcheck
|
|
|
|
fi
|
|
|
|
|
|
|
|
cd "$GITHUB_WORKSPACE"
|
|
|
|
pwd
|
|
|
|
ls -ld vpnsetup.sh
|
|
|
|
|
|
|
|
export SHELLCHECK_OPTS="-e SC1090,SC1091"
|
|
|
|
shellcheck --version
|
|
|
|
shopt -s globstar
|
|
|
|
ls -ld -- **/*.sh
|
|
|
|
shellcheck **/*.sh
|