2022-03-22 11:03:15 -04:00
|
|
|
name: Shellcheck
|
|
|
|
on:
|
2022-10-12 04:50:06 -04:00
|
|
|
workflow_dispatch:
|
2022-03-22 11:03:15 -04:00
|
|
|
push:
|
|
|
|
branches:
|
|
|
|
- main
|
2022-10-18 10:17:41 -04:00
|
|
|
- "release/**"
|
2022-09-03 11:47:47 -04:00
|
|
|
paths:
|
|
|
|
- "**.sh"
|
2022-11-10 10:14:57 -05:00
|
|
|
- "**.bash"
|
2023-01-16 08:24:05 -05:00
|
|
|
- "image/**"
|
2023-02-14 14:01:00 -05:00
|
|
|
- ".github/workflows/test-shellcheck.yml"
|
2022-03-22 11:03:15 -04:00
|
|
|
pull_request:
|
2022-09-03 11:47:47 -04:00
|
|
|
paths:
|
|
|
|
- "**.sh"
|
2022-11-10 10:14:57 -05:00
|
|
|
- "**.bash"
|
2023-01-16 08:24:05 -05:00
|
|
|
- "image/**"
|
2023-02-14 14:01:00 -05:00
|
|
|
- ".github/workflows/test-shellcheck.yml"
|
2022-03-22 11:03:15 -04:00
|
|
|
|
|
|
|
jobs:
|
|
|
|
shellcheck:
|
|
|
|
name: Shellcheck
|
2022-11-10 10:55:24 -05:00
|
|
|
runs-on: ubuntu-22.04
|
2022-03-22 11:03:15 -04:00
|
|
|
steps:
|
2022-07-20 04:48:01 -04:00
|
|
|
- name: Checkout
|
2023-01-05 10:17:51 -05:00
|
|
|
uses: actions/checkout@ac593985615ec2ede58e132d2e21d2b1cbd6127c # v3.3.0
|
2022-09-19 04:59:46 -04:00
|
|
|
with:
|
2022-12-19 09:21:28 -05:00
|
|
|
ref: ${{ !github.event.pull_request.head.repo.fork && github.head_ref || '' }}
|
2022-09-19 04:59:46 -04:00
|
|
|
|
2022-11-17 08:38:01 -05:00
|
|
|
- name: Setup Go environment
|
2022-12-14 08:55:14 -05:00
|
|
|
uses: actions/setup-go@6edd4406fa81c3da01a34fa6f6343087c207a568 # v3.5.0
|
2022-11-17 08:38:01 -05:00
|
|
|
with:
|
2023-02-03 12:15:40 -05:00
|
|
|
go-version: "1.20.1"
|
2022-11-17 08:38:01 -05:00
|
|
|
|
|
|
|
- name: Install shellfmt
|
|
|
|
shell: bash
|
|
|
|
run: |
|
2023-01-11 04:17:31 -05:00
|
|
|
go install github.com/katexochen/sh/v3/cmd/shfmt@faf7f58964998201d22efe41fef41ae4e1953f3b # v3.6.0
|
2022-11-17 08:38:01 -05:00
|
|
|
|
2022-06-30 05:27:23 -04:00
|
|
|
- name: Run ShellCheck
|
2023-01-31 11:38:44 -05:00
|
|
|
uses: ludeeus/action-shellcheck@00cae500b08a931fb5698e11e79bfbd38e612a38 # v2.0.0
|
2022-06-30 05:27:23 -04:00
|
|
|
with:
|
2022-11-08 12:42:50 -05:00
|
|
|
severity: info
|
2022-08-12 04:20:19 -04:00
|
|
|
ignore_paths: charts/cilium
|
2022-11-17 08:38:01 -05:00
|
|
|
additional_files: $(shfmt -f . | grep -v helm/charts/cilium)
|