这是一个迁移测试
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

37 lines
1.2 KiB

# This workflow will build a Java project with Maven
# For more information see: https://help.github.com/actions/language-and-framework-guides/building-and-testing-java-with-maven
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 1.8
uses: actions/setup-java@v1
with:
java-version: '1.8'
- name: Build with Maven
run: mvn -B package --file pom.xml
# 通过 Dockerfile 构建镜像
- name: Build docker image
run: docker build . -t demo_actions:0.1
# 登陆到我们自己的 docker registry
- name: Login to aliyun docker image registry
run: echo "${{ secrets.REGISTRY_PASSWORD }}" | docker login --username=shuangguanyize registry.cn-hangzhou.aliyuncs.com --password-stdin
- name: docker tag to aliyun docker image registry
run: docker tag demo_actions:0.1 registry.cn-hangzhou.aliyuncs.com/yvam0910/demo_actions:0.1
# 上传 docker 镜像
- name: Push image to aliyun docker image registry
run: docker push registry.cn-hangzhou.aliyuncs.com/yvam0910/demo_actions:0.1