TangHuan 86a70a29e2
All checks were successful
Gitea Actions Demo / Explore-Gitea-Actions (push) Successful in 1m21s
init-cicd-build-maven
2025-04-03 10:31:34 +08:00

45 lines
1.2 KiB
YAML

name: Gitea Actions Demo
run-name: ${{ gitea.actor }} is testing out Gitea Actions 🚀
on: [push]
jobs:
Explore-Gitea-Actions:
runs-on: ubuntu-latest
steps:
- name: 克隆代码
uses: actions/checkout@v4
- uses: actions/setup-java@v4
name: 准备jdk
with:
distribution: 'microsoft'
java-version: '17'
architecture: x64
cache: "maven"
- run: java -version
- uses: https://git.pintantan.com/actions/setup-maven@v5.3
name: 准备Maven
with:
maven-version: '3.9.7'
- name: 编译
run: mvn -s settings.xml -B -Ptrydo -Phuawei clean install -U -DskipTests -Pprod
- run: mkdir -p target/dependency && (cd target/dependency; jar -xf ../*.jar)
- name: Login to Gitea Container Registry
uses: https://git.pintantan.com/docker/login-action@v2
with:
registry: git.pintantan.com
username: tanghuan
password: th123th123
- name: Build and push Docker image
uses: https://git.pintantan.com/docker/build-push-action@v4
with:
context: .
push: true
tags: git.pintantan.com/tanghuan/cescide:dev-1.0.0