mirror of
https://github.com/linux-system-roles/network.git
synced 2026-07-18 00:46:05 +00:00
When we submit a PR for a CI update or docs, we do not want to start CI checking for ansible-lint, qemu, etc. When we are doing CI updates to 30 or more roles, this fires off a lot of unnecessary tests, which sometimes causes the linux-system-roles org in github to be throttled. When submitting a PR that can skip ci, use "[citest_skip]" in the PR title. Signed-off-by: Rich Megginson <rmeggins@redhat.com>
42 lines
1 KiB
YAML
42 lines
1 KiB
YAML
---
|
|
name: ShellCheck
|
|
on: # yamllint disable-line rule:truthy
|
|
pull_request:
|
|
merge_group:
|
|
branches:
|
|
- main
|
|
types:
|
|
- checks_requested
|
|
push:
|
|
branches:
|
|
- main
|
|
workflow_dispatch:
|
|
env:
|
|
# some scripts source tox-lsr scripts - suppress that check
|
|
SHELLCHECK_OPTS: -e SC1091
|
|
permissions:
|
|
contents: read
|
|
jobs:
|
|
shellcheck:
|
|
if: |
|
|
!((github.event_name == 'pull_request' && contains(github.event.pull_request.title, '[citest_skip]')) ||
|
|
(github.event_name == 'push' && contains(github.event.head_commit.message, '[citest_skip]')))
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- name: Update git
|
|
run: |
|
|
set -euxo pipefail
|
|
sudo apt update
|
|
sudo apt install -y git
|
|
|
|
- name: Checkout repo
|
|
uses: actions/checkout@v6
|
|
|
|
- name: Run ShellCheck
|
|
id: shellcheck_id
|
|
uses: ludeeus/action-shellcheck@master
|
|
|
|
- name: Show file paths scanned
|
|
run: |
|
|
echo Files scanned:
|
|
echo "${{ steps.shellcheck_id.outputs.files }}"
|