push to docker registry
This commit is contained in:
33
.github/workflows/docker-image.yml
vendored
33
.github/workflows/docker-image.yml
vendored
@@ -2,17 +2,34 @@ name: Docker Image CI
|
||||
|
||||
on:
|
||||
push:
|
||||
branches: [ master ]
|
||||
branches: [master]
|
||||
pull_request:
|
||||
branches: [ master ]
|
||||
branches: [master]
|
||||
|
||||
jobs:
|
||||
|
||||
build:
|
||||
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
- name: Build the Docker image
|
||||
run: docker build . --file Dockerfile.buster --tag opencv-docker-golang:$(date +%s) --tag opencv-docker-golang:buster
|
||||
- uses: actions/checkout@v2
|
||||
- name: Build the Docker image with golang:buster
|
||||
run: docker build . --file Dockerfile.buster --tag opencv-docker-golang:buster
|
||||
|
||||
- name: Build the Docker image with ubuntu:20.04
|
||||
run: docker build . --file Dockerfile.ubuntu --tag opencv-docker-golang:ubuntu
|
||||
|
||||
- name: Build the Docker image with dlib
|
||||
run: docker build . --file Dockerfile.dlib --tag opencv-docker-golang:dlib
|
||||
push_to_registries:
|
||||
runs-on: ubuntu-latest
|
||||
permissions:
|
||||
packages: write
|
||||
contents: read
|
||||
steps:
|
||||
- name: Push Docker image to multiple registries
|
||||
uses: actions/checkout@v2
|
||||
|
||||
- name: Log in to Docker Hub
|
||||
uses: docker/login-action@f054a8b539a109f9f41c372932f1ae047eff08c9
|
||||
with:
|
||||
username: ${{ secrets.DOCKER_USERNAME }}
|
||||
password: ${{ secrets.DOCKER_PASSWORD }}
|
||||
|
||||
Reference in New Issue
Block a user