fix of npm issues #509
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: Version Sync Check | |
| on: | |
| pull_request: | |
| paths: | |
| - 'pom.xml' | |
| - 'Dockerfile' | |
| - 'Dockerfile.web' | |
| push: | |
| branches: [master, main] | |
| jobs: | |
| version-check: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v5 | |
| - name: Set up JDK 25 | |
| uses: actions/setup-java@v5 | |
| with: | |
| java-version: "25" | |
| distribution: "temurin" | |
| cache: "maven" | |
| - name: Validate version consistency | |
| run: | | |
| chmod +x ./scripts/validate-versions.sh | |
| ./scripts/validate-versions.sh | |
| - name: Comment on PR if versions are out of sync | |
| if: failure() && github.event_name == 'pull_request' | |
| uses: actions/github-script@v8 | |
| with: | |
| script: | | |
| const comment = `🚨 **Version Sync Issue Detected** | |
| The versions in your Dockerfiles don't match the version in \`pom.xml\`. | |
| **🔧 To fix this automatically:** | |
| \`\`\`bash | |
| ./scripts/sync-versions.sh | |
| git add Dockerfile Dockerfile.web | |
| git commit -m "Sync versions with pom.xml" | |
| \`\`\` | |
| **📋 Current status:** | |
| - The \`validate-versions.sh\` script found mismatched versions | |
| - Please ensure all Docker build arguments match the Maven project version | |
| - This helps maintain consistency across all deployment methods | |
| --- | |
| <sub>Automated version check by GitHub Actions</sub>`; | |
| github.rest.issues.createComment({ | |
| issue_number: context.issue.number, | |
| owner: context.repo.owner, | |
| repo: context.repo.repo, | |
| body: comment | |
| }); |