Skip to content

Commit

Permalink
Create CI for building and pushing Docker images
Browse files Browse the repository at this point in the history
  • Loading branch information
PeterBowman committed Jun 19, 2024
1 parent 2cf20ce commit 546c477
Showing 1 changed file with 47 additions and 0 deletions.
47 changes: 47 additions & 0 deletions .github/workflows/docker.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
name: Docker

on:
workflow_dispatch:
inputs:
ubuntu-tag:
description: 'The Ubuntu tag to use for the Docker image'
required: true
type: choice
options:
- '20.04'
- '22.04'
opencv-tag:
description: 'The OpenCV tag to use for the Docker image'
required: true
type: choice
options:
- '3.4'
- '4.x'
- '5.x'

env:
REGISTRY: ghcr.io

jobs:
docker:
runs-on: ubuntu-latest
steps:
- name: Check out main project
uses: actions/checkout@v4

- name: Log in to the Container Registry
uses: docker/login-action@v3
with:
registry: ${{env.REGISTRY}}
username: ${{github.actor}}
password: ${{secrets.GITHUB_TOKEN}}

- name: Build and push
uses: docker/build-push-action@v6
with:
push: true
tags: vision:ubuntu-${{inputs.ubuntu-tag}}
context: docker
build-args: |
OPENCV_TAG=${{inputs.opencv-tag}}
UBUNTU_TAG=${{inputs.ubuntu-tag}}

0 comments on commit 546c477

Please sign in to comment.