Skip to content

Commit

Permalink
build: add Docker static build of OpenCV 4.8.0
Browse files Browse the repository at this point in the history
Signed-off-by: deadprogram <[email protected]>
  • Loading branch information
deadprogram committed Jul 31, 2023
1 parent dcdfddf commit 4d2a904
Showing 1 changed file with 54 additions and 6 deletions.
60 changes: 54 additions & 6 deletions .github/workflows/docker.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,8 @@ jobs:
uses: docker/metadata-action@v4
with:
images: |
gocv/opencv
ghcr.io/${{ github.repository_owner }}/opencv
gocv/opencv:4.8.0
ghcr.io/${{ github.repository_owner }}/opencv:4.8.0
tags: |
type=sha,format=long
type=raw,value=latest
Expand Down Expand Up @@ -60,6 +60,54 @@ jobs:
cache-from: type=gha
cache-to: type=gha,mode=max

opencv-static:
name: opencv-static
runs-on: ubuntu-latest
permissions:
packages: write
contents: read
steps:
- name: Set up QEMU
uses: docker/setup-qemu-action@v2
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2
- name: Check out the repo
uses: actions/checkout@v3
- name: Docker meta
id: meta
uses: docker/metadata-action@v4
with:
images: |
gocv/opencv:4.8.0-static
ghcr.io/${{ github.repository_owner }}/opencv:4.8.0-static
tags: |
type=sha,format=long
type=raw,value=latest
- name: Log in to Docker Hub
uses: docker/login-action@v2
with:
username: ${{ secrets.DOCKER_HUB_USERNAME }}
password: ${{ secrets.DOCKER_HUB_ACCESS_TOKEN }}
- name: Log in to Github Container Registry
uses: docker/login-action@v2
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Build and push
uses: docker/build-push-action@v4
with:
file: Dockerfile.opencv-static
platforms: linux/amd64,linux/arm64
context: .
push: true
tags: |
gocv/opencv:4.8.0-static
ghcr.io/${{ github.repository_owner }}/opencv:4.8.0-static
labels: ${{ steps.meta.outputs.labels }}
cache-from: type=gha
cache-to: type=gha,mode=max

opencv-gpu-cuda-11:
name: opencv-gpu-cuda-11
runs-on: ubuntu-latest
Expand All @@ -76,8 +124,8 @@ jobs:
uses: docker/metadata-action@v4
with:
images: |
gocv/4.8.0-gpu-cuda-11
ghcr.io/${{ github.repository_owner }}/4.8.0-gpu-cuda-11
gocv/opencv:4.8.0-gpu-cuda-11
ghcr.io/${{ github.repository_owner }}/opencv:4.8.0-gpu-cuda-11
tags: |
type=sha,format=long
type=raw,value=latest
Expand Down Expand Up @@ -168,8 +216,8 @@ jobs:
uses: docker/metadata-action@v4
with:
images: |
gocv/4.8.0-gpu-cuda-12
ghcr.io/${{ github.repository_owner }}/4.8.0-gpu-cuda-12
gocv/opencv:4.8.0-gpu-cuda-12
ghcr.io/${{ github.repository_owner }}/opemcv:4.8.0-gpu-cuda-12
tags: |
type=sha,format=long
type=raw,value=latest
Expand Down

0 comments on commit 4d2a904

Please sign in to comment.