Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
34 changes: 34 additions & 0 deletions .github/workflows/version-check.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
name: Version File Check

on:
pull_request:
types: [opened, synchronize]

jobs:
check-version-file:
runs-on: ubuntu-latest

steps:
- name: Checkout repository
uses: actions/checkout@v3
with:
fetch-depth: 2 # Fetch at least two commits to allow comparison with previous commit

- name: Check if config.yaml has been updated
run: |
if git diff --name-only HEAD^ HEAD | grep -q "config.yaml"; then
echo "config.yaml file has been modified."
else
echo "Error: config.yaml file is not updated."
exit 1
fi

- name: Check if appVersion in config.yaml has been updated
run: |
VERSION_CHANGE=$(git diff HEAD^ HEAD config.yaml | grep 'appVersion')
Copy link

Copilot AI Sep 16, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The grep command will match any line containing 'appVersion', including comments or documentation. This could lead to false positives. Consider using a more specific pattern like grep '^[[:space:]]*appVersion:' to match only the actual configuration field.

Suggested change
VERSION_CHANGE=$(git diff HEAD^ HEAD config.yaml | grep 'appVersion')
VERSION_CHANGE=$(git diff HEAD^ HEAD config.yaml | grep '^[[:space:]]*appVersion:')

Copilot uses AI. Check for mistakes.
if [ -n "$VERSION_CHANGE" ]; then
echo "appVersion in config.yaml has been updated."
else
echo "Error: appVersion in config.yaml is not updated."
exit 1
fi
2 changes: 1 addition & 1 deletion config.yaml
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
appVersion: 1.0.0.1000
appVersion: 1.0.1.1001