1
0
Fork 0
mirror of https://github.com/ludeeus/action-shellcheck.git synced 2024-08-16 10:09:53 +02:00
shellcheck/.github/workflows/ignore_names.yml

45 lines
1,017 B
YAML
Raw Normal View History

name: 'ignore_names'
2020-10-25 21:00:46 +01:00
on:
push:
2022-11-06 20:50:21 +01:00
branches:
- "master"
2020-10-25 21:00:46 +01:00
pull_request:
2022-11-06 20:50:21 +01:00
branches:
- "master"
2020-10-25 21:00:46 +01:00
permissions: {}
2020-10-25 21:00:46 +01:00
jobs:
ignore_names:
name: ignore_names
2020-10-25 21:00:46 +01:00
runs-on: ${{ matrix.os }}
strategy:
matrix:
os:
- ubuntu-latest
- macos-latest
steps:
- name: Checkout
uses: actions/checkout@v4.1.0
2020-10-25 21:00:46 +01:00
- name: Run ShellCheck
uses: ./
id: check
with:
ignore_paths: ignore
ignore_names: ignore_single_file.sh
2020-10-25 21:00:46 +01:00
- name: Verify check
run: |
expect="testfiles/test.bash"
notexpect="testfiles/ignore_single_file.sh"
2020-10-25 21:00:46 +01:00
if [[ ! "${{ steps.check.outputs.files }}" =~ $expect ]];then
echo "::error:: Expected file $expect not found in ${{ steps.check.outputs.files }}"
exit 1
elif [[ "${{ steps.check.outputs.files }}" =~ $notexpect ]];then
echo "::error:: Expected file $notexpect found in ${{ steps.check.outputs.files }}"
exit 1
fi