File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 2222name : Publish Docker Image
2323
2424on :
25- workflow_call :
25+ push :
2626 branches :
2727 - feat/fusion-releaser
28+ workflow_call :
2829 inputs :
2930 tag :
3031 description : ' Version tag for the image (e.g. v1.0.0).'
Original file line number Diff line number Diff line change @@ -44,11 +44,16 @@ jobs:
4444 CHANGED_FILES=$(git diff --name-only origin/$BASE_BRANCH...HEAD)
4545 DATAZIP_MODIFICATION_YEAR_REGEX="Modified by Datazip Inc\. in [0-9]{4}"
4646 NOT_MODIFIED_FILES=""
47+ LICENSE_REGEX="Licensed to the Apache Software Foundation|Apache License|SPDX-License-Identifier"
4748 for file in $CHANGED_FILES; do
4849 if [[ ! -f "$file" ]]; then
4950 continue
5051 fi
5152
53+ if ! head -40 "$file" | grep -q -E "$LICENSE_REGEX"; then
54+ continue
55+ fi
56+
5257 if ! head -40 "$file" | grep -q -E "$DATAZIP_MODIFICATION_YEAR_REGEX"; then
5358 NOT_MODIFIED_FILES+="$file"$'\n'
5459 fi
You can’t perform that action at this time.
0 commit comments