init-cicd-build
Some checks failed
Gitea Actions Demo / Explore-Gitea-Actions (push) Failing after 4m48s

This commit is contained in:
TangHuan 2025-04-02 14:16:56 +08:00
parent 47c0e9fb61
commit 9c554fee99

View File

@ -8,10 +8,18 @@ jobs:
steps: steps:
- name: 克隆代码 - name: 克隆代码
uses: https://gitea.com/actions/checkout@v4 uses: https://gitea.com/actions/checkout@v4
- name: 下载jdk ## 缓存 Maven 依赖
run: | # - name: Cache Jdk download
download_url="https://mirrors.tuna.tsinghua.edu.cn/Adoptium/17/jdk/x64/linux/OpenJDK17U-jdk_x64_linux_hotspot_17.0.14_7.tar.gz" # uses: https://gitea.com/actions/cache@v3
wget -O $RUNNER_TEMP/java_package.tar.gz $download_url # with:
# path: $RUNNER_TEMP/java_package.tar.gz
# key: ${{ runner.os }}-jdk-17.0.14
# restore-keys: ${{ runner.os }}-jdk-17.0.14
#
# - name: 下载jdk
# run: |
# download_url="https://mirrors.tuna.tsinghua.edu.cn/Adoptium/17/jdk/x64/linux/OpenJDK17U-jdk_x64_linux_hotspot_17.0.14_7.tar.gz"
# wget -O $RUNNER_TEMP/java_package.tar.gz $download_url
- uses: https://gitea.com/actions/setup-java@v4 - uses: https://gitea.com/actions/setup-java@v4
name: 准备jdk name: 准备jdk
@ -21,6 +29,7 @@ jobs:
java-version: '21.0.6' java-version: '21.0.6'
architecture: x64 architecture: x64
cache: "maven" cache: "maven"
# 缓存 Maven 依赖 # 缓存 Maven 依赖
- name: Cache Maven packages - name: Cache Maven packages
uses: https://gitea.com/actions/cache@v3 uses: https://gitea.com/actions/cache@v3
@ -33,6 +42,19 @@ jobs:
run: chmod +x ./mvnw && ./mvnw -s settings.xml -B -Ptrydo -Phuawei clean install -U -DskipTests -Pprod run: chmod +x ./mvnw && ./mvnw -s settings.xml -B -Ptrydo -Phuawei clean install -U -DskipTests -Pprod
- run: mkdir -p target/dependency && (cd target/dependency; jar -xf ../*.jar) - run: mkdir -p target/dependency && (cd target/dependency; jar -xf ../*.jar)
- name: 打包Docker
run: docker build -t ccr.ccs.tencentyun.com/jqyt/biz-dev:1.0.0 . - name: Login to Gitea Container Registry
uses: https://gitea.com/docker/login-action@v2
with:
registry: git.pintantan.com
username: ${{ secrets.GITEA_USERNAME }}
password: ${{ secrets.GITEA_PASSWORD }}
- name: Build and push Docker image
uses: https://gitea.com/docker/build-push-action@v4
with:
context: .
push: true
tags: git.pintantan.com/tanghuan/cescide:dev-1.0.0