There was an error while loading. Please reload this page.
1 parent 12f5e36 commit c8dcdd0Copy full SHA for c8dcdd0
1 file changed
.github/workflows/dockerimage.yml
@@ -35,6 +35,18 @@ jobs:
35
run: |
36
echo "value=$(jq .version ${{ env.package_json }} -r)" >> $GITHUB_OUTPUT
37
38
+ - name: Verify tag matches package.json version
39
+ # 去掉 tag 前导 v 后与 package.json 中的版本号比对,
40
+ # 不一致说明开发者推 tag 前忘记同步版本号,直接终止整个流程。
41
+ run: |
42
+ TAG="${GITHUB_REF_NAME#v}"
43
+ VERSION="${{ steps.version.outputs.value }}"
44
+ if [ "$TAG" != "$VERSION" ]; then
45
+ echo "Tag (v$TAG) does not match version in package.json ($VERSION), stopping"
46
+ exit 1
47
+ fi
48
+ echo "Tag matches version: $TAG"
49
+
50
- name: Free Disk Space (Ubuntu)
51
uses: jlumbroso/free-disk-space@main
52
with:
0 commit comments