-
Notifications
You must be signed in to change notification settings - Fork 867
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Signed-off-by: deadprogram <[email protected]>
- Loading branch information
1 parent
cca0e70
commit 2c49558
Showing
1 changed file
with
59 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,59 @@ | ||
# This is the Github action to build and push the gocv/opencv Docker images. | ||
# | ||
name: Docker | ||
on: | ||
push: | ||
branches: [build-opencv-alpine, alpine-static-ffmpeg] | ||
|
||
concurrency: | ||
group: ${{ github.workflow }}-${{ github.ref }} | ||
cancel-in-progress: true | ||
|
||
jobs: | ||
opencv-ffmpeg: | ||
name: opencv | ||
runs-on: ubuntu-latest | ||
permissions: | ||
packages: write | ||
contents: read | ||
steps: | ||
- name: Set up QEMU | ||
uses: docker/setup-qemu-action@v3 | ||
- name: Set up Docker Buildx | ||
uses: docker/setup-buildx-action@v3 | ||
- name: Check out the repo | ||
uses: actions/checkout@v4 | ||
- name: Docker meta | ||
id: meta | ||
uses: docker/metadata-action@v5 | ||
with: | ||
images: | | ||
gocv/opencv:4.10.0-alpine-ffmpeg | ||
ghcr.io/${{ github.repository_owner }}/opencv:4.10.0-alpine-ffmpeg | ||
tags: | | ||
type=sha,format=long | ||
type=raw,value=latest | ||
- name: Log in to Docker Hub | ||
uses: docker/login-action@v3 | ||
with: | ||
username: ${{ secrets.DOCKER_HUB_USERNAME }} | ||
password: ${{ secrets.DOCKER_HUB_ACCESS_TOKEN }} | ||
- name: Log in to Github Container Registry | ||
uses: docker/login-action@v3 | ||
with: | ||
registry: ghcr.io | ||
username: ${{ github.actor }} | ||
password: ${{ secrets.GITHUB_TOKEN }} | ||
- name: Build and push | ||
uses: docker/build-push-action@v6 | ||
with: | ||
file: Dockerfile.opencv-static-alpine-ffmpeg | ||
platforms: linux/amd64,linux/arm64 | ||
context: . | ||
push: true | ||
tags: | | ||
gocv/opencv:4.10.0-alpine-ffmpeg | ||
ghcr.io/${{ github.repository_owner }}/opencv:4.10.0-alpine-ffmpeg | ||
labels: ${{ steps.meta.outputs.labels }} | ||
cache-from: type=gha | ||
cache-to: type=gha,mode=max |