Skip to content
This repository was archived by the owner on Feb 9, 2026. It is now read-only.

Commit 352ec91

Browse files
refactor docker-release workflow to check package.json version more reliably
1 parent 7249952 commit 352ec91

1 file changed

Lines changed: 3 additions & 2 deletions

File tree

.github/workflows/docker-release.yml

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,8 +19,9 @@ jobs:
1919

2020
- name: check if package.json version is updated by comparing with the previous commit
2121
run: |
22-
git diff --name-only HEAD~1 HEAD | grep -q "package.json"
23-
if [ $? -ne 0 ]; then
22+
OLD_VERSION=$(git show HEAD~1:package.json | jq -r .version)
23+
NEW_VERSION=$(jq -r .version package.json)
24+
if [ "$OLD_VERSION" = "$NEW_VERSION" ]; then
2425
echo "Error: package.json version is not updated"
2526
exit 1
2627
fi

0 commit comments

Comments
 (0)