name: Gitea Actions Demo run-name: ${{ gitea.actor }} is testing out Gitea Actions 🚀 on: [push] jobs: Explore-Gitea-Actions: runs-on: ubuntu-22.04 steps: - name: Checkout code uses: http://127.0.0.1:3000/bichangxiong/checkout@v4 # 使用 Gitea 镜像 with: fetch-depth: 1 # 只拉取最新一次提交 - name: Maven run: mvn clean install - name: Build with Maven run: mvn -B package -DskipTests -pl ruoyi-modules/Property -am - name: cp run: copy ./ruoyi-modules/Property/target/Property.jar C:\devtool\server - name: kill run: Get-NetTCPConnection -LocalPort 10001 -State Listen -ErrorAction SilentlyContinue | Where-Object { $_.OwningProcess -ne $null } | ForEach-Object { Stop-Process -Id $_.OwningProcess -Force -ErrorAction SilentlyContinue } - name: run run: java -jar C:\devtool\server\Property.jar # - copy ./ruoyi-modules/Property/target/Property.jar C:\devtool\server # - pwd # - java -jar ./docker/jar/Property.jar # - name: cd # run: cd ruoyi-modules/Property # - name: Build with Maven # run: mvn -B clean package -DskipTests --file pom.xml # - name: Start Spring Cloud Services # run: | # # 启动顺序示例:注册中心 -> 配置中心 -> 网关 -> 业务服务 # echo "Starting Server..." # java -jar Property.jar # SERVER_PIDS[0]=$! # # 等待注册中心启动 # sleep 30 # done # 保持工作流运行,避免服务被终止 # wait # env: # JAVA_OPTS: "-Xmx512m -Xms256m" # timeout-minutes: 20