Skip to content

Commit 3463e3b

Browse files
authored
ci(*): detect unexpected EE changes (#14452)
* ci(*): detect unexpected EE files * ci(*): unify similar workflows * ci(*): detect ee changelog
1 parent 8ed78ce commit 3463e3b

File tree

1 file changed

+25
-4
lines changed

1 file changed

+25
-4
lines changed

.github/workflows/copyright-check.yml

Lines changed: 25 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,25 @@
1-
name: Check for Enterprise Copyright
1+
name: Detect Unexpected EE Changes
22

33
on:
44
pull_request:
55

6+
concurrency:
7+
group: ${{ github.workflow }}-${{ github.ref }}
8+
cancel-in-progress: ${{ github.event_name == 'pull_request' }}
9+
610
jobs:
7-
check-copyright:
11+
check-copyright-and-ee-files:
812
runs-on: ubuntu-latest
913
steps:
1014
- name: Checkout
11-
uses: actions/checkout@v3
15+
uses: actions/checkout@v4
1216

1317
- name: Find Enterprise Copyright
1418
shell: bash
1519
run: |
1620
set -e
1721
18-
workflow_file=$(grep -rnl "^name:[[:space:]]*Check for Enterprise Copyright" .github/workflows/*.yml | head -n1)
22+
workflow_file=$(grep -rnl "^name:[[:space:]]*Detect Unexpected EE Changes" .github/workflows/*.yml | head -n1)
1923
echo "Detected workflow file: $workflow_file"
2024
2125
all_files=$(grep -r -F -l "This software is copyright Kong Inc. and its licensors." .)
@@ -32,3 +36,20 @@ jobs:
3236
echo "No enterprise copyright found."
3337
fi
3438
39+
- name: Get changed EE files
40+
id: changed-ee-files
41+
uses: kong/changed-files@4edd678ac3f81e2dc578756871e4d00c19191daf
42+
with:
43+
files: |
44+
spec-ee/**
45+
plugins-ee/**
46+
kong/enterprise_edition/**
47+
kong/plugins/*-advanced/**
48+
changelog/**/*-ee/**
49+
50+
- name: Detect EE files
51+
if: steps.changed-ee-files.outputs.any_changed == 'true'
52+
run: |
53+
echo "The following unexpected EE files were detected:"
54+
echo "${{ steps.changed-ee-files.outputs.all_changed_files }}"
55+
exit 1

0 commit comments

Comments
 (0)