mirror of
https://github.com/bitnami/charts.git
synced 2026-03-11 15:37:20 +08:00
[bitnami/*] chore: 👷 Exclude license check in CRDs (#18254)
Signed-off-by: Javier Salmeron Garcia <jsalmeron@vmware.com>
This commit is contained in:
committed by
GitHub
parent
e6070f6239
commit
a62f78395b
17
.github/workflows/license-headers.yml
vendored
17
.github/workflows/license-headers.yml
vendored
@@ -36,9 +36,20 @@ jobs:
|
||||
files_changed="$(sed -nr 's/[\-\+]{3} [ab]\/(.*)/\1/p' $TEMP_FILE | sort | uniq)"
|
||||
templates=()
|
||||
regular_files=()
|
||||
is_excluded() {
|
||||
# Check if a given path contains one of the excluded paths
|
||||
local -r path="${1:?missing path}"
|
||||
local -r excluded_paths=("/crds/")
|
||||
for excluded_path in "${excluded_paths[@]}"; do
|
||||
if [[ "${path}" =~ ${excluded_path} ]]; then
|
||||
return 0
|
||||
fi
|
||||
done
|
||||
return 1
|
||||
}
|
||||
while read -r file_changed; do
|
||||
# Avoid removed files
|
||||
if [[ -f "${file_changed}" ]]; then
|
||||
# Avoid removed files and excluded files
|
||||
if [[ -f "${file_changed}" ]] && ! is_excluded "${file_changed}"; then
|
||||
if [[ "${file_changed}" =~ \/templates\/ ]]; then
|
||||
templates+=("${file_changed}")
|
||||
else
|
||||
@@ -65,4 +76,4 @@ jobs:
|
||||
fi
|
||||
- name: Check license Headers
|
||||
uses: apache/skywalking-eyes/header@v0.4.0
|
||||
if: ${{ steps.get-modified-files.outputs.result == 'success' }}
|
||||
if: ${{ steps.get-modified-files.outputs.result == 'success' }}
|
||||
|
||||
Reference in New Issue
Block a user