Skip to content

Commit 315ca69

Browse files
new workflow added
1 parent 37a25f7 commit 315ca69

File tree

1 file changed

+33
-0
lines changed

1 file changed

+33
-0
lines changed
Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
name: Block MySQL 5.x Usage
2+
3+
on:
4+
pull_request:
5+
branches:
6+
- develop
7+
8+
jobs:
9+
mysql-check:
10+
runs-on:
11+
labels: self-hosted
12+
13+
steps:
14+
- name: Checkout code
15+
uses: actions/checkout@v4
16+
17+
- name: Check for MySQL 5.x
18+
run: |
19+
echo "Scanning for MySQL 5.x usage..."
20+
matches=$(grep -rEn \
21+
--include="*.sql" \
22+
--include="*.tf" \
23+
--include="*.yml" \
24+
--include="*.yaml" \
25+
--include="*Dockerfile*" \
26+
"mysql[^0-9]*5\." . || true)
27+
if [[ -n "$matches" ]]; then
28+
echo "::error::MySQL 5.x usage detected within the file(s) below. Please upgrade to MySQL 8.x."
29+
echo "$matches"
30+
exit 1
31+
else
32+
echo "No MySQL 5.x usage found."
33+
fi

0 commit comments

Comments
 (0)