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