2 changed files with 1 additions and 34 deletions
@ -1,33 +0,0 @@ |
|||||
name: Java CI with Maven |
|
||||
|
|
||||
on: |
|
||||
push: |
|
||||
branches: [ master ] |
|
||||
pull_request: |
|
||||
branches: [ master ] |
|
||||
|
|
||||
jobs: |
|
||||
build: |
|
||||
|
|
||||
runs-on: ubuntu-latest |
|
||||
|
|
||||
steps: |
|
||||
- uses: actions/checkout@master |
|
||||
- name: Set up JDK 8 |
|
||||
uses: actions/setup-java@v2 |
|
||||
with: |
|
||||
java-version: '1.8' |
|
||||
distribution: 'adopt' |
|
||||
- name: Build with Maven |
|
||||
run: mvn -B package --file pom.xml |
|
||||
# 通过 Dockerfile 构建镜像 |
|
||||
- name: Build docker image |
|
||||
run: docker build . -t {{ image_name:image_version }} |
|
||||
|
|
||||
# 登陆到我们自己的 docker registry |
|
||||
- name: Login to aliyun docker image registry |
|
||||
run: echo "${{ secrets.REGISTRY_PASSWORD }}" | docker login --username=shangguanyize registry.cn-hangzhou.aliyuncs.com --password-stdin |
|
||||
|
|
||||
# 上传 docker 镜像 |
|
||||
- name: Push image to aliyun docker image registry |
|
||||
run: docker push {{ image_name:image_version }} |
|
||||
Loading…
Reference in new issue