Skip to content

Update OpenCV

Update OpenCV #288

Workflow file for this run

name: Update OpenCV
on:
workflow_dispatch:
schedule:
- cron: '0 7 * * *'
jobs:
update-opencv:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Fetch release version
env:
GITHUB_TOKEN: ${{ github.token }}
OWNER: opencv
REPO: opencv
run: |
VERSION=$(gh api "/repos/$OWNER/$REPO/releases/latest" --jq ".tag_name")
echo "VERSION=$VERSION" >> "$GITHUB_ENV"
- name: Modify file if new version
run: |
sed -E -i "s@(OPENCV_GIT_TAG=\s+\")([0-9]+\.[0-9]+\.[0-9]+)(\")@\1$VERSION\3@" .github/workflows/deps/version.env
- name: Create PR if new version
uses: peter-evans/create-pull-request@v6
with:
token: ${{ secrets.PAT }}
title: "chore(ci): update opencv to ${{ env.VERSION }}"
branch: "opencv-${{ env.VERSION }}"
commit-message: "chore(ci): update opencv to ${{ env.VERSION }}"
body: |
Update OpenCV to ${{ env.VERSION }}.
This PR has been created automatically.
committer: github-actions[bot] <noreply@github.com>
author: github-actions[bot] <noreply@github.com>
assignees: "EmixamPP"
labels: dependencies
delete-branch: true