-
-
Notifications
You must be signed in to change notification settings - Fork 22
41 lines (36 loc) · 1.32 KB
/
depend-opencv.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
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_VERSION:\s+\")([0-9]+\.[0-9]+\.[0-9]+)(\")@\1$VERSION\3@" .github/workflows/build.yml
- name: Create PR if new version
uses: peter-evans/create-pull-request@v5
with:
token: ${{ secrets.PAT }}
title: "build(deps): update opencv to ${{ env.VERSION }}"
branch: "opencv-${{ env.VERSION }}"
commit-message: "chore(deps): update opencv to ${{ env.VERSION }}"
body: |
Update OpenCV to ${{ env.VERSION }}.
This PR has been created automatically.
committer: github-actions[bot] <[email protected]>
author: github-actions[bot] <[email protected]>
assignees: "EmixamPP"
labels: dependencies
delete-branch: true