init-cicd-build-jdk
Some checks failed
Gitea Actions Demo / Explore-Gitea-Actions (push) Failing after 2s
Some checks failed
Gitea Actions Demo / Explore-Gitea-Actions (push) Failing after 2s
This commit is contained in:
parent
bfe2bd4b1f
commit
7dddc6a9e8
@ -6,8 +6,9 @@ jobs:
|
|||||||
Explore-Gitea-Actions:
|
Explore-Gitea-Actions:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
|
- run: ping -c 4 git.pintantan.com
|
||||||
- name: 克隆代码
|
- name: 克隆代码
|
||||||
uses: https://gitea.com/actions/checkout@v4
|
uses: https://git.pintantan.com/actions/checkout@v4
|
||||||
# 缓存 Maven 依赖
|
# 缓存 Maven 依赖
|
||||||
# - name: Cache Jdk download
|
# - name: Cache Jdk download
|
||||||
# uses: https://gitea.com/actions/cache@v3
|
# uses: https://gitea.com/actions/cache@v3
|
||||||
@ -21,7 +22,7 @@ jobs:
|
|||||||
# download_url="https://mirrors.tuna.tsinghua.edu.cn/Adoptium/17/jdk/x64/linux/OpenJDK17U-jdk_x64_linux_hotspot_17.0.14_7.tar.gz"
|
# 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
|
# wget -O $RUNNER_TEMP/java_package.tar.gz $download_url
|
||||||
|
|
||||||
- uses: https://gitea.com/actions/setup-java@v4
|
- uses: https://git.pintantan.com/actions/setup-java@v4
|
||||||
name: 准备jdk
|
name: 准备jdk
|
||||||
with:
|
with:
|
||||||
distribution: 'jdkfile'
|
distribution: 'jdkfile'
|
||||||
@ -29,10 +30,10 @@ jobs:
|
|||||||
java-version: '17.0.14'
|
java-version: '17.0.14'
|
||||||
architecture: x64
|
architecture: x64
|
||||||
cache: "maven"
|
cache: "maven"
|
||||||
|
- run: java -version
|
||||||
# 缓存 Maven 依赖
|
# 缓存 Maven 依赖
|
||||||
- name: Cache Maven packages
|
- name: Cache Maven packages
|
||||||
uses: https://gitea.com/actions/cache@v3
|
uses: https://git.pintantan.com/actions/cache@v3
|
||||||
with:
|
with:
|
||||||
path: ~/.m2/repository
|
path: ~/.m2/repository
|
||||||
key: ${{ runner.os }}-m2-${{ hashFiles('**/pom.xml') }}
|
key: ${{ runner.os }}-m2-${{ hashFiles('**/pom.xml') }}
|
||||||
@ -44,14 +45,14 @@ jobs:
|
|||||||
- run: mkdir -p target/dependency && (cd target/dependency; jar -xf ../*.jar)
|
- run: mkdir -p target/dependency && (cd target/dependency; jar -xf ../*.jar)
|
||||||
|
|
||||||
- name: Login to Gitea Container Registry
|
- name: Login to Gitea Container Registry
|
||||||
uses: https://gitea.com/docker/login-action@v2
|
uses: https://git.pintantan.com/docker/login-action@v2
|
||||||
with:
|
with:
|
||||||
registry: git.pintantan.com
|
registry: git.pintantan.com
|
||||||
username: tanghuan
|
username: tanghuan
|
||||||
password: th123th123
|
password: th123th123
|
||||||
|
|
||||||
- name: Build and push Docker image
|
- name: Build and push Docker image
|
||||||
uses: https://gitea.com/docker/build-push-action@v4
|
uses: https://git.pintantan.com/docker/build-push-action@v4
|
||||||
with:
|
with:
|
||||||
context: .
|
context: .
|
||||||
push: true
|
push: true
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user