This commit is contained in:
jack ning
2025-07-20 15:09:04 +08:00
parent 8b36dc6fe9
commit 367405dcdc
2 changed files with 38 additions and 2 deletions

View File

@@ -47,12 +47,47 @@ jobs:
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Create Maven settings
run: |
mkdir -p ~/.m2
cat > ~/.m2/settings.xml << EOF
<settings xmlns="http://maven.apache.org/SETTINGS/1.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/SETTINGS/1.0.0
http://maven.apache.org/xsd/settings-1.0.0.xsd">
<profiles>
<profile>
<id>snapshots</id>
<repositories>
<repository>
<id>central-portal-snapshots</id>
<name>Central Portal Snapshots</name>
<url>https://oss.sonatype.org/content/repositories/snapshots/</url>
<releases>
<enabled>false</enabled>
</releases>
<snapshots>
<enabled>true</enabled>
<updatePolicy>always</updatePolicy>
</snapshots>
</repository>
</repositories>
</profile>
</profiles>
<activeProfiles>
<activeProfile>snapshots</activeProfile>
</activeProfiles>
</settings>
EOF
- name: Maven build
run: |
# 清理并构建
mvn clean
mvn -B -DskipTests=true install --file pom.xml
# 强制更新 SNAPSHOT 依赖,确保能下载到最新的 SNAPSHOT 版本
mvn -B -DskipTests=true -U install --file pom.xml
cd starter
mvn -B -DskipTests=true package --file pom.xml
mvn -B -DskipTests=true -U package --file pom.xml
- name: Login to Docker Hub
uses: docker/login-action@v3

View File

@@ -275,6 +275,7 @@
<enabled>true</enabled>
</snapshots>
</repository>
<!-- https://oss.sonatype.org/content/repositories/snapshots/com/alibaba/cloud/ai/spring-ai-alibaba-bom/1.0.0.3-SNAPSHOT/maven-metadata.xml -->
<repository>
<name>Central Portal Snapshots</name>
<id>central-portal-snapshots</id>