springboot-helloworld/.gitea/workflows/java-ci.yaml

37 lines
942 B
YAML

name: test ci
run-name: test run name
on:
release:
types: [published]
env:
DAY_OF_WEEK: Monday
jobs:
java-ci:
runs-on: maven-3.8
steps:
- name: Checkout code
uses: https://gitea.com/actions/checkout@v3
- name: Checkout env
run: |
echo "1.${{ vars.HARBOR_REGISTRY_URL }}"
echo "2.${{ vars.HARBOR_REGISTRY_USER }}"
echo "3.${{ vars.HARBOR_REGISTRY_PASSWORD }}"
- name: Build code
run: |
mvn clean install
mkdir app
cp target/*.jar app
- name: Build image
run: |
docker build -t harbor.hzbb.top/${{ gitea.repository }}:${{ gitea.ref_name }} .
- name: Push image
run: |
docker login -u hzbb -p Hzbb@12354 harbor.hzbb.top
docker build -t harbor.hzbb.top/${{ gitea.repository }}:${{ gitea.ref_name }} .