The proper way to refer to the project is "Cloud Hypervisor" without the hyphen in the middle. On the other hand, if one refers to the binary name, it is "cloud-hypervisor". Signed-off-by: Sebastien Boeuf <sebastien.boeuf@intel.com>
48 lines
1.3 KiB
YAML
48 lines
1.3 KiB
YAML
name: Cloud Hypervisor's Docker image update
|
|
|
|
on:
|
|
push:
|
|
branches: main
|
|
paths: resources/Dockerfile
|
|
pull_request:
|
|
paths: resources/Dockerfile
|
|
|
|
jobs:
|
|
main:
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- name: Code checkout
|
|
uses: actions/checkout@v2
|
|
|
|
- name: Set up QEMU
|
|
uses: docker/setup-qemu-action@v1
|
|
|
|
- name: Set up Docker Buildx
|
|
uses: docker/setup-buildx-action@v1
|
|
|
|
- name: Login to DockerHub
|
|
if: ${{ github.event_name == 'push' }}
|
|
uses: docker/login-action@v1
|
|
with:
|
|
username: ${{ secrets.DOCKERHUB_USERNAME }}
|
|
password: ${{ secrets.DOCKERHUB_TOKEN }}
|
|
|
|
- name: Build and push
|
|
if: ${{ github.event_name == 'push' }}
|
|
uses: docker/build-push-action@v2
|
|
with:
|
|
file: ./resources/Dockerfile
|
|
platforms: linux/amd64,linux/arm64
|
|
push: true
|
|
tags: cloudhypervisor/dev:latest
|
|
|
|
- name: Build only
|
|
if: ${{ github.event_name == 'pull_request' }}
|
|
uses: docker/build-push-action@v2
|
|
with:
|
|
file: ./resources/Dockerfile
|
|
platforms: linux/amd64,linux/arm64
|
|
tags: cloudhypervisor/dev:latest
|
|
|
|
- name: Image digest
|
|
run: echo ${{ steps.docker_build.outputs.digest }}
|