File tree Expand file tree Collapse file tree 1 file changed +43
-0
lines changed Expand file tree Collapse file tree 1 file changed +43
-0
lines changed Original file line number Diff line number Diff line change 1+ name : " Bump tesseract version"
2+ on :
3+ schedule :
4+ - cron : " 0 0 * * MON"
5+ workflow_dispatch :
6+
7+ jobs :
8+ diff :
9+ runs-on : ubuntu-latest
10+ steps :
11+ - uses : actions/github-script@v6
12+ id : tesseract
13+ with :
14+ script : |
15+ const latest = (await github.rest.repos.getLatestRelease({
16+ owner: 'tesseract-ocr',
17+ repo: 'tesseract',
18+ })).data.tag_name;
19+ return latest;
20+ - uses : actions/github-script@v6
21+ id : leptonica
22+ with :
23+ script : |
24+ const latest = (await github.rest.repos.getLatestRelease({
25+ owner: 'DanBloomberg',
26+ repo: 'leptonica',
27+ })).data.tag_name;
28+ return latest;
29+ result-encoding : string
30+ - uses : actions/checkout@v3
31+ with :
32+ fetch-depth : 1
33+ - name : update-dockerfile
34+ run : |
35+ sed -i 's/\(TESSERACT_VERSION=\).*$/\1${{ steps.tesseract.outputs.result }}/g' Dockerfile.al1
36+ sed -i 's/\(TESSERACT_VERSION=\).*$/\1${{ steps.tesseract.outputs.result }}/g' Dockerfile.al2
37+ sed -i 's/\(LEPTONICA_VERSION=\).*$/\1${{ steps.leptonica.outputs.result }}/g' Dockerfile.al1
38+ sed -i 's/\(LEPTONICA_VERSION=\).*$/\1${{ steps.leptonica.outputs.result }}/g' Dockerfile.al2
39+ - name : Create Pull Request
40+ uses : peter-evans/create-pull-request@v4
41+ with :
42+ commit-message : " chore: bump tesseract to ${{ steps.tesseract.outputs.result }} & leptonica to ${{ steps.leptonica.outputs.result }}"
43+ title : " chore: bump tesseract to ${{ steps.tesseract.outputs.result }} & leptonica to ${{ steps.leptonica.outputs.result }}"
You can’t perform that action at this time.
0 commit comments