完善在git发布新版时的构建流程
This commit is contained in:
parent
319592dd19
commit
6597194b9c
|
@ -2,57 +2,49 @@ name: CI-master
|
||||||
run-name: ${{ gitea.actor }} is testing out Gitea Actions
|
run-name: ${{ gitea.actor }} is testing out Gitea Actions
|
||||||
on:
|
on:
|
||||||
release:
|
release:
|
||||||
types: [published, edited]
|
types: [published]
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
Docker-Build:
|
Docker-Build-Push:
|
||||||
runs-on: joylink-local233
|
runs-on: joylink-local233
|
||||||
steps:
|
steps:
|
||||||
- name: 测试release触发及一些参数
|
|
||||||
run: |
|
|
||||||
echo "event: author is ${{ github.event.release.author.name }}, isLatest is ${{ github.event.release.isLatest }}, isPrerelease is ${{ github.event.release.prerelease }}"
|
|
||||||
echo "event: name is ${{ github.event.release.name }}, tag is ${{ github.event.release.tag }}, tagName is ${{ github.event.release.tag_name }}"
|
|
||||||
echo "event_name: ${{ github.event_name }}"
|
|
||||||
echo "ref: ${{ github.ref }}"
|
|
||||||
- name: 检出代码
|
- name: 检出代码
|
||||||
uses: https://gitea.joylink.club/actions/checkout@v4
|
uses: https://gitea.joylink.club/actions/checkout@v4
|
||||||
with:
|
with:
|
||||||
submodules: recursive
|
submodules: recursive
|
||||||
- name: 查看代码分支和版本
|
- name: 设置java环境
|
||||||
|
uses: https://gitea.joylink.club/actions/setup-java@v4
|
||||||
|
with:
|
||||||
|
java-version: '11'
|
||||||
|
distribution: 'zulu'
|
||||||
|
cache: 'maven'
|
||||||
|
cache-dependency-path: './pom.xml'
|
||||||
|
- name: 设置Maven环境
|
||||||
|
uses: https://gitea.joylink.club/actions/local-setup-maven@v0.1.1
|
||||||
|
with:
|
||||||
|
maven-version: 3.8.8
|
||||||
|
- name: 构建
|
||||||
run: |
|
run: |
|
||||||
git branch -vv
|
mvn -Dmaven.test.skip=true clean package
|
||||||
# - name: 设置java环境
|
- name: 设置 Docker
|
||||||
# uses: https://gitea.joylink.club/actions/setup-java@v4
|
uses: https://gitea.joylink.club/actions/local-setup-docker-cli-action@v0.1.1
|
||||||
# with:
|
- name: 设置 Docker Buildx
|
||||||
# java-version: '11'
|
uses: https://gitea.joylink.club/actions/local-setup-buildx-action@v0.1.3
|
||||||
# distribution: 'zulu'
|
- name: docker登录gitea.joylink.club
|
||||||
# cache: 'maven'
|
uses: https://gitea.joylink.club/docker/login-action@v3
|
||||||
# cache-dependency-path: './pom.xml'
|
with:
|
||||||
# - name: 设置Maven环境
|
registry: gitea.joylink.club
|
||||||
# uses: https://gitea.joylink.club/actions/local-setup-maven@v0.1.1
|
username: shengxuqiang
|
||||||
# with:
|
password: ${{ secrets.SHENGXUQIANG_PASSWORD }}
|
||||||
# maven-version: 3.8.8
|
- name: Docker Build and push
|
||||||
# - name: 构建
|
uses: https://gitea.joylink.club/docker/build-push-action@v5
|
||||||
# run: |
|
with:
|
||||||
# mvn -Dmaven.test.skip=true clean package
|
context: .
|
||||||
# - name: 设置 Docker
|
file: ./Dockerfile
|
||||||
# uses: https://gitea.joylink.club/actions/local-setup-docker-cli-action@v0.1.1
|
push: true
|
||||||
# - name: 设置 Docker Buildx
|
tags: |
|
||||||
# uses: https://gitea.joylink.club/actions/local-setup-buildx-action@v0.1.3
|
gitea.joylink.club/joylink/rt-sim-training-service:${{ github.event.release.tag_name }}
|
||||||
# - name: docker登录gitea.joylink.club
|
gitea.joylink.club/joylink/rt-sim-training-service:latest
|
||||||
# uses: https://gitea.joylink.club/docker/login-action@v3
|
|
||||||
# with:
|
|
||||||
# registry: gitea.joylink.club
|
|
||||||
# username: shengxuqiang
|
|
||||||
# password: ${{ secrets.SHENGXUQIANG_PASSWORD }}
|
|
||||||
# - name: Docker Build and push
|
|
||||||
# uses: https://gitea.joylink.club/docker/build-push-action@v5
|
|
||||||
# with:
|
|
||||||
# context: .
|
|
||||||
# file: ./Dockerfile
|
|
||||||
# push: true
|
|
||||||
# tags: |
|
|
||||||
# gitea.joylink.club/joylink/rt-sim-training-service:latest
|
|
||||||
# - name: 发布到本地测试环境
|
# - name: 发布到本地测试环境
|
||||||
# uses: https://gitea.joylink.club/appleboy/ssh-action@v1.0.3
|
# uses: https://gitea.joylink.club/appleboy/ssh-action@v1.0.3
|
||||||
# with:
|
# with:
|
||||||
|
|
Loading…
Reference in New Issue