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"
|
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"
|
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
|
2022-10-12 12:05:58 -04:00
|
|
|
uses: actions/checkout@93ea575cb5d8a053eaa0ac8fa3b40d7e05a33cc8 # tag=v3.1.0
|
2022-09-19 04:59:46 -04:00
|
|
|
with:
|
2022-10-19 04:32:22 -04:00
|
|
|
ref: ${{ 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-02 04:33:19 -05:00
|
|
|
uses: actions/setup-go@d0a58c1c4d2b25278816e339b944508c875f3613 # v3.4.0
|
2022-11-17 08:38:01 -05:00
|
|
|
with:
|
|
|
|
go-version: "1.19.3"
|
|
|
|
|
|
|
|
- name: Install shellfmt
|
|
|
|
shell: bash
|
|
|
|
run: |
|
|
|
|
go install github.com/katexochen/sh/v3/cmd/shfmt@latest
|
|
|
|
|
2022-06-30 05:27:23 -04:00
|
|
|
- name: Run ShellCheck
|
2022-11-08 12:38:48 -05:00
|
|
|
uses: ludeeus/action-shellcheck@6d3f514f44620b9d4488e380339edc0d9bbe2fba # master
|
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)
|