ci: breakout docker build for merge only

This commit is contained in:
Mike
2021-03-16 15:29:52 -07:00
parent 54b7550e31
commit a190a214f1
2 changed files with 29 additions and 18 deletions

View File

@@ -41,24 +41,6 @@ jobs:
run: cd build && cmake --build . --config Release
- name: Build RPC (Debug)
run: cd build && cmake --build . --config Debug
build-docker:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: docker build
run: docker build -f "Dockerfile" --tag vprodemo.azurecr.io/rpc:${{ github.sha }} --tag vprodemo.azurecr.io/rpc:latest .
- name: Docker Login
uses: docker/login-action@v1.6.0
with:
registry: vprodemo.azurecr.io
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_PASSWORD }}
logout: true
- name: Push the Docker image to the registry
run: docker push vprodemo.azurecr.io/rpc:${{ github.sha }}
- name: Push the Docker image to the registry
run: docker push vprodemo.azurecr.io/rpc:latest
build-linux:
runs-on: ${{ matrix.os }}

29
.github/workflows/docker-ci.yml vendored Normal file
View File

@@ -0,0 +1,29 @@
#*********************************************************************
# Copyright (c) Intel Corporation 2020
# SPDX-License-Identifier: Apache-2.0
#*********************************************************************/
name: Docker Image CI
on:
push:
branches: [ master ]
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Build the Docker image
run: docker build -f "Dockerfile" --tag vprodemo.azurecr.io/rpc:${{ github.sha }} --tag vprodemo.azurecr.io/rpc:latest .
- name: Docker Login
uses: docker/login-action@v1.6.0
with:
registry: vprodemo.azurecr.io
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_PASSWORD }}
logout: true
- name: Push the Docker image to the registry
run: docker push vprodemo.azurecr.io/rpc:${{ github.sha }}
- name: Push the Docker image to the registry
run: docker push vprodemo.azurecr.io/rpc:latest