finance/.gitea/workflows/build.yml
gitea.164500.xyz e1cb9a5b48
Some checks failed
/ build-image (push) Failing after 1m7s
s
2025-04-17 19:28:22 +00:00

85 lines
2.4 KiB
YAML

on:
#release:
#types: [published]
push:
branches:
- "master"
jobs:
build-image:
runs-on: ubuntu-act-latest
steps:
-
name: Check Out Repo
uses: https://github.com/actions/checkout@v4
#with:
#repository: jj/paolu-mybatis
#path: master
#token: ''
- name: Set Java Action
id: steps1
uses: https://github.com/actions/setup-java@v4
with:
distribution: temurin
java-version: 21
#cache: maven
#cache-dependency-path: .pom.xml
-
name: Set Maven Action
uses: https://github.com/stCarolas/setup-maven@v5
with:
maven-version: 3.9.6
-
name: Cache
uses: actions/cache@v4
id: cache1
with:
path: ~/.m2/repository
key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }}
restore-keys: |
${{ runner.os }}-maven-
#- name: Set repo-java-maven Env
#uses: https://github.com/s4u/setup-maven-action@v1.11.0
#with:
#java-distribution: temurin
#java-version: 20
#maven-version: 3.9.5
- if: ${{ steps.cache1.outputs.cache-hit == 'true' }}
name: is hit cache
continue-on-error: true
run: echo " hit cache ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }}"
-
name: Build With Maven
run: mvn -B package -Dmaven.test.skip
- name: Uzip
run: mkdir -p target/dependency && (cd target/dependency; jar -xf ../*.jar)
#build with docker
#-
#name: set up qemu
#uses: https://github.com/docker/setup-qemu-action@v3
#-
#name: Set Docker Buildx
#uses: https://github.com/docker/setup-buildx-action@v3
-
name: Buildah Action
uses: redhat-actions/buildah-build@v2
with:
containerfiles: ./Dockerfile | ./Containerfile
#image: my-new-image
#tags: v1 ${{ github.sha }}
#build-args:
-
name: Login To Zot
uses: https://github.com/docker/login-action@v3
with:
registry: zot.164500.xyz
username: test
password: test
-
name: Build And Push Image To Zot
uses: https://github.com/docker/build-push-action@v5
with:
context: .
push: true
tags: zot.164500.xyz/jj/finance:latest