We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 37a25f7 commit 315ca69Copy full SHA for 315ca69
.github/workflows/mysql-version-check.yml
@@ -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