Skip to content

Update OpenCV

Update OpenCV #3

Workflow file for this run

name: Update OpenCV
on:
workflow_dispatch:
inputs:
version:
description: 'OpenCV Version (e.g. 4.9.0)'
required: true
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Download and unzip the OpenCV sdk
run: |
wget https://github.com/opencv/opencv/releases/download/${{ github.event.inputs.version }}/opencv-${{ github.event.inputs.version }}-android-sdk.zip
unzip opencv-${{ github.event.inputs.version }}-android-sdk.zip
- name: Update OpenCV Native SDK
run: |
rm -rd opencv/native
mkdir opencv/native
mkdir opencv/native/jni
mkdir opencv/native/libs
cp -r OpenCV-android-sdk/sdk/native/jni/include opencv/native/jni/
cp -r OpenCV-android-sdk/sdk/native/libs opencv/native/
- name: Update OpenCV Java SDK
run: sed -i 's/ext.opencv_version = .*/ext.opencv_version = "${{ github.event.inputs.version }}"/g' build.gradle
- name: Create Pull Request
uses: peter-evans/create-pull-request@v6
with:
branch: feature/update_opencv
title: Update of OpenCV
commit-message: Update of OpenCV
add-paths: |
opencv/native/*
build.gradle