enable ci build on pr

This commit is contained in:
Miao Wang 2020-09-13 12:30:03 +08:00
parent e5715884fa
commit efbe77a8d8

View File

@ -5,6 +5,10 @@ on:
branches: branches:
- master - master
- docker-test - docker-test
pull_request:
branches:
- master
- docker-test
jobs: jobs:
multi: multi:
@ -72,6 +76,7 @@ jobs:
- -
name: Login to DockerHub name: Login to DockerHub
uses: docker/login-action@v1 uses: docker/login-action@v1
if: github.event_name == 'push'
with: with:
username: ${{ secrets.DOCKERHUB_USERNAME }} username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }} password: ${{ secrets.DOCKERHUB_TOKEN }}
@ -82,7 +87,7 @@ jobs:
context: . context: .
file: ${{ env.docker_file }}/Dockerfile file: ${{ env.docker_file }}/Dockerfile
platforms: linux/amd64,linux/arm64 platforms: linux/amd64,linux/arm64
push: true push: ${{ github.event_name == 'push' }}
tags: tunathu/${{ matrix.image }}:${{ env.docker_tag }} tags: tunathu/${{ matrix.image }}:${{ env.docker_tag }}
cache-from: type=local,src=/tmp/.buildx-cache cache-from: type=local,src=/tmp/.buildx-cache
cache-to: type=local,dest=/tmp/.buildx-cache cache-to: type=local,dest=/tmp/.buildx-cache