2022-03-22 16:03:15 +01:00
|
|
|
name: Shellcheck
|
|
|
|
on:
|
2022-10-12 10:50:06 +02:00
|
|
|
workflow_dispatch:
|
2022-03-22 16:03:15 +01:00
|
|
|
push:
|
|
|
|
branches:
|
|
|
|
- main
|
2022-10-18 16:17:41 +02:00
|
|
|
- "release/**"
|
2022-09-03 17:47:47 +02:00
|
|
|
paths:
|
|
|
|
- "**.sh"
|
2022-11-10 16:14:57 +01:00
|
|
|
- "**.bash"
|
2022-03-22 16:03:15 +01:00
|
|
|
pull_request:
|
2022-09-03 17:47:47 +02:00
|
|
|
paths:
|
|
|
|
- "**.sh"
|
2022-11-10 16:14:57 +01:00
|
|
|
- "**.bash"
|
2022-03-22 16:03:15 +01:00
|
|
|
|
|
|
|
jobs:
|
|
|
|
shellcheck:
|
|
|
|
name: Shellcheck
|
2022-11-10 16:55:24 +01:00
|
|
|
runs-on: ubuntu-22.04
|
2022-03-22 16:03:15 +01:00
|
|
|
steps:
|
2022-07-20 10:48:01 +02:00
|
|
|
- name: Checkout
|
2022-10-12 18:05:58 +02:00
|
|
|
uses: actions/checkout@93ea575cb5d8a053eaa0ac8fa3b40d7e05a33cc8 # tag=v3.1.0
|
2022-09-19 10:59:46 +02:00
|
|
|
with:
|
2022-10-19 10:32:22 +02:00
|
|
|
ref: ${{ github.head_ref }}
|
2022-09-19 10:59:46 +02:00
|
|
|
|
2022-11-17 14:38:01 +01:00
|
|
|
- name: Setup Go environment
|
|
|
|
uses: actions/setup-go@c4a742cab115ed795e34d4513e2cf7d472deb55f # tag=v3.3.1
|
|
|
|
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 11:27:23 +02:00
|
|
|
- name: Run ShellCheck
|
2022-11-08 18:38:48 +01:00
|
|
|
uses: ludeeus/action-shellcheck@6d3f514f44620b9d4488e380339edc0d9bbe2fba # master
|
2022-06-30 11:27:23 +02:00
|
|
|
with:
|
2022-11-08 18:42:50 +01:00
|
|
|
severity: info
|
2022-08-12 10:20:19 +02:00
|
|
|
ignore_paths: charts/cilium
|
2022-11-17 14:38:01 +01:00
|
|
|
additional_files: $(shfmt -f . | grep -v helm/charts/cilium)
|