From b46f6942a4cb6406b79532894ed1d21b0c3bf86f Mon Sep 17 00:00:00 2001 From: TangHuan Date: Wed, 2 Apr 2025 10:21:32 +0800 Subject: [PATCH] init-cicd --- .gitea/workflows/dev.yaml | 20 +- settings.xml | 408 ++++++++++++++++++++++++++++++++++++++ 2 files changed, 416 insertions(+), 12 deletions(-) create mode 100644 settings.xml diff --git a/.gitea/workflows/dev.yaml b/.gitea/workflows/dev.yaml index 5468ed0..92819c9 100644 --- a/.gitea/workflows/dev.yaml +++ b/.gitea/workflows/dev.yaml @@ -21,23 +21,19 @@ jobs: jdkFile: ${{ runner.temp }}/java_package.tar.gz java-version: '21.0.6' architecture: x64 - - name: Configure Maven settings - uses: s4u/maven-settings-action@v2.8.0 + # 缓存 Maven 依赖 + - name: Cache Maven packages + uses: https://gitea.com/actions/cache@v3 with: - mirrors: | - [ - { - "id": "trydo", - "mirrorOf": "*", - "url": "https://rep.dev.trydotec.com/nexus/repository/trydo/" - } - ] + path: ~/.m2/repository + key: ${{ runner.os }}-m2-${{ hashFiles('**/pom.xml') }} + restore-keys: ${{ runner.os }}-m2 - name: 编译 - run: chmod +x ./mvnw && ./mvnw clean install -U -DskipTests -Pprod + run: chmod +x ./mvnw && ./mvnw -s settings.xml clean install -U -DskipTests -Pprod - name: 打包 - run: ./mvnw clean install -U -DskipTests -Pprod + run: ./mvnw spring-boot:build-image-no-fork - run: echo "🖥️ The workflow is now ready to test your code on the runner." - name: List files in the repository diff --git a/settings.xml b/settings.xml new file mode 100644 index 0000000..b7f0ad4 --- /dev/null +++ b/settings.xml @@ -0,0 +1,408 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + trydo + admin + zd123456 + + + zd + admin + zd123456 + + + + nexus + admin + zd123456 + + + + pentaho-public + devreaduser + {zIMyJWfHKfoHiBJAVsAgW4E5BcJzR+nhTtgPy0J+/rs=} + + + thday-movie-ticketing-system-maven + maven-1733034359763 + b367b34d5f2eae6d9498629a010a69ecf626ca39 + + + + rdc-releases + 63aa8d60c8605436e801b00e + 1kS1yEeu_IQU + + + rdc-snapshots + 63aa8d60c8605436e801b00e + 1kS1yEeu_IQU + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + trydo + + + + trydo + https://rep.dev.trydotec.com/nexus/repository/trydo/ + + true + always + + + true + always + + + + + + aliyun + + + + aliyun + https://maven.aliyun.com/repository/public/ + + + + + huawei + + + + huawei + https://mirrors.huaweicloud.com/repository/maven/ + + + + + + + spring + + + spring-milestones + Spring Milestones + https://repo.spring.io/milestone + + false + + + + spring-snapshots + Spring Snapshots + https://repo.spring.io/snapshot + + false + + + + + + + + + tryon + + + + + rdc-releases + + https://packages.aliyun.com/maven/repository/2314917-release-Rur2IA/ + + + + true + + + + + + false + + + + + + + + rdc-snapshots + + https://packages.aliyun.com/maven/repository/2314917-snapshot-WqFvpI/ + + + + false + + + + + + true + + + + + + + + + + + + + + +