29 lines
1008 B
YAML
29 lines
1008 B
YAML
#*********************************************************************
|
|
# Copyright (c) Intel Corporation 2020
|
|
# SPDX-License-Identifier: Apache-2.0
|
|
#*********************************************************************/
|
|
|
|
name: Docker Image CI
|
|
|
|
on:
|
|
push:
|
|
branches: [ main ]
|
|
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 |