Compare commits

..

No commits in common. "main" and "v0.0.3" have entirely different histories.
main ... v0.0.3

2 changed files with 18 additions and 12 deletions

View File

@ -1,10 +1,12 @@
name: java ci
run-name: java ci
name: test ci
run-name: test run name
on:
release:
types: [published]
env:
DAY_OF_WEEK: Monday
jobs:
java-ci:
@ -13,20 +15,24 @@ jobs:
- name: Checkout code
uses: https://gitea.com/actions/checkout@v3
- name: Checkout env
run: |
echo "1.${{ gitea.ref }}"
echo "2.${{ gitea.event_name }}"
echo "3.${{ runner.os }}"
echo "4.${{ gitea.repository }}"
- name: Build code
run: |
mvn clean install
mvn clean install
mkdir app
cp target/*.jar app
- name: Build image
run: |
docker build -t ${{ vars.REGISTRY_URL }}/${{ gitea.repository }}:${{ gitea.ref_name }} .
docker build -t harbor.hzbb.top/test/springboot-helloworld:v0.0.2 .
- name: Push image
run: |
docker login -u ${{ vars.REGISTRY_USER }} -p ${{ vars.REGISTRY_PASSWORD }} ${{ vars.REGISTRY_URL }}
docker push ${{ vars.REGISTRY_URL }}/${{ gitea.repository }}:${{ gitea.ref_name }}
- name: echo info
run: |
echo "${{ gitea.repository }} 发布已完成!"
echo "镜像地址:${{ vars.REGISTRY_URL }}/${{ gitea.repository }}:${{ gitea.ref_name }} "
docker login -u hzbb -p Hzbb@12354 harbor.hzbb.top
docker build -t harbor.hzbb.top/test/springboot-helloworld:v0.0.2 .

View File

@ -9,7 +9,7 @@ EXPOSE 8080
RUN ln -sf /usr/share/zoneinfo/Asia/Shanghai /etc/localtime &&\
echo 'Asia/Shanghai' >/etc/timezone
COPY target/*.jar /app/app.jar
COPY app /
WORKDIR /app