更新 .gitea/workflows/dev.yml
Some checks failed
/ build-parent-pom (push) Successful in 1m55s
/ build-and-push-services (ruoyi-auth) (push) Failing after 26s
/ build-and-push-services (ruoyi-gateway) (push) Failing after 27s
/ build-and-push-services (ruoyi-modules/Property) (push) Failing after 26s
/ build-and-push-services (ruoyi-modules/Sis) (push) Failing after 27s
/ build-and-push-services (ruoyi-modules/ruoyi-gen) (push) Failing after 27s
/ build-and-push-services (ruoyi-modules/ruoyi-job) (push) Failing after 25s
/ build-and-push-services (ruoyi-modules/ruoyi-resource) (push) Failing after 25s
/ build-and-push-services (ruoyi-modules/ruoyi-system) (push) Failing after 25s
/ build-and-push-services (ruoyi-modules/ruoyi-workflow) (push) Failing after 26s
/ build-and-push-services (ruoyi-seata-server) (push) Failing after 17s
/ build-and-push-services (ruoyi-sentinel-dashboard) (push) Failing after 17s
/ build-and-push-services (ruoyi-snailjob-server) (push) Failing after 17s
/ build-and-push-services (ruoyi-visual/ruoyi-monitor) (push) Failing after 24s
/ build-and-push-services (ruoyi-visual/ruoyi-nacos) (push) Failing after 23s

This commit is contained in:
bichangxiong 2025-08-14 12:04:13 +08:00
parent 8c32e29571
commit f807f37395

View File

@ -80,50 +80,50 @@ jobs:
sleep 10 sleep 10
done done
build-common-modules: # build-common-modules:
needs: build-parent-pom # needs: build-parent-pom
runs-on: ubuntu # runs-on: ubuntu
steps: # steps:
- name: 拉取代码仓库 # - name: 拉取代码仓库
uses: http://git.missmoc.top/mocheng/checkout@v4 # uses: http://git.missmoc.top/mocheng/checkout@v4
- name: 配置环境变量 # - name: 配置环境变量
run: | # run: |
export JAVA_HOME="/java17/java17" # export JAVA_HOME="/java17/java17"
export MAVEN_HOME="/maven/apache-maven-3.9.11" # export MAVEN_HOME="/maven/apache-maven-3.9.11"
echo "JAVA_HOME=$JAVA_HOME" >> $GITHUB_ENV # echo "JAVA_HOME=$JAVA_HOME" >> $GITHUB_ENV
echo "$JAVA_HOME/bin" >> $GITHUB_PATH # echo "$JAVA_HOME/bin" >> $GITHUB_PATH
echo "MAVEN_HOME=$MAVEN_HOME" >> $GITHUB_ENV # echo "MAVEN_HOME=$MAVEN_HOME" >> $GITHUB_ENV
echo "$MAVEN_HOME/bin" >> $GITHUB_PATH # echo "$MAVEN_HOME/bin" >> $GITHUB_PATH
- name: 构建通用模块(仅本地使用,不上传) # - name: 构建通用模块(仅本地使用,不上传)
run: | # run: |
COMMON_MODULES=( # COMMON_MODULES=(
"ruoyi-common" # "ruoyi-common"
"ruoyi-api" # "ruoyi-api"
"ruoyi-common-bom" # "ruoyi-common-bom"
"ruoyi-common-alibaba-bom" # "ruoyi-common-alibaba-bom"
"ruoyi-api-bom" # "ruoyi-api-bom"
) # )
for module in "${COMMON_MODULES[@]}"; do # for module in "${COMMON_MODULES[@]}"; do
MODULE_POM_ABSOLUTE_PATH="${GITHUB_WORKSPACE}/${module}/pom.xml" # MODULE_POM_ABSOLUTE_PATH="${GITHUB_WORKSPACE}/${module}/pom.xml"
if [ ! -f "$MODULE_POM_ABSOLUTE_PATH" ]; then # if [ ! -f "$MODULE_POM_ABSOLUTE_PATH" ]; then
echo "警告:模块 $module 不存在,跳过" # echo "警告:模块 $module 不存在,跳过"
continue # continue
fi # fi
retries=3 # retries=3
count=0 # count=0
until "$MAVEN_HOME/bin/mvn" clean compile install -U -DskipTests -f "$MODULE_POM_ABSOLUTE_PATH"; do # until "$MAVEN_HOME/bin/mvn" clean compile install -U -DskipTests -f "$MODULE_POM_ABSOLUTE_PATH"; do
count=$((count + 1)) # count=$((count + 1))
if [ $count -ge $retries ]; then # if [ $count -ge $retries ]; then
echo "错误:模块 $module 构建失败" # echo "错误:模块 $module 构建失败"
exit 1 # exit 1
fi # fi
sleep 10 # sleep 10
done # done
done # done
build-and-push-services: build-and-push-services:
needs: build-common-modules needs: build-common-modules