From ebcd10d66ff77504e5933b36a82b803da9932a6d Mon Sep 17 00:00:00 2001 From: mudler Date: Thu, 4 May 2023 15:01:29 +0200 Subject: [PATCH] ci: manually update deps --- .github/bump_deps.sh | 9 +++++++ .github/workflows/bump_deps.yaml | 41 ++++++++++++++++++++++++++++++++ renovate.json | 33 +------------------------ 3 files changed, 51 insertions(+), 32 deletions(-) create mode 100755 .github/bump_deps.sh create mode 100644 .github/workflows/bump_deps.yaml diff --git a/.github/bump_deps.sh b/.github/bump_deps.sh new file mode 100755 index 00000000..d8fff4a3 --- /dev/null +++ b/.github/bump_deps.sh @@ -0,0 +1,9 @@ +#!/bin/bash +set -xe +REPO=$1 +BRANCH=$2 +VAR=$3 + +LAST_COMMIT=$(curl -s -H "Accept: application/vnd.github.VERSION.sha" "https://api.github.com/repos/$REPO/commits/$BRANCH") + +sed -i Makefile -e "s/$VAR?=.*/$VAR?=$LAST_COMMIT/" diff --git a/.github/workflows/bump_deps.yaml b/.github/workflows/bump_deps.yaml new file mode 100644 index 00000000..da7d09ab --- /dev/null +++ b/.github/workflows/bump_deps.yaml @@ -0,0 +1,41 @@ +name: Bump dependencies +on: + schedule: + - cron: 0 20 * * * + workflow_dispatch: +jobs: + bump: + strategy: + fail-fast: false + matrix: + include: + - repository: "go-skynet/go-gpt4all-j.cpp" + variable: "GOGPT4ALLJ_VERSION" + branch: "master" + - repository: "go-skynet/go-llama.cpp" + variable: "GOLLAMA_VERSION" + branch: "master" + - repository: "go-skynet/go-gpt2.cpp" + variable: "GOGPT2_VERSION" + branch: "master" + - repository: "donomii/go-rwkv.cpp" + variable: "RWKV_VERSION" + branch: "main" + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v3 + - name: Bump dependencies 🔧 + run: | + bash .github/bump_deps.sh ${{ matrix.repo }} ${{ matrix.branch }} ${{ matrix.variable }} + - name: Create Pull Request + uses: peter-evans/create-pull-request@v5 + with: + token: ${{ secrets.UPDATE_BOT_TOKEN }} + push-to-fork: ci-forks/LocalAI + commit-message: ':arrow_up: Update ${{ matrix.repo }}' + title: ':arrow_up: Update ${{ matrix.repo }}' + body: Bump of ${{ matrix.repo }} version + signoff: true + + + diff --git a/renovate.json b/renovate.json index 35bd038e..4bd832f5 100644 --- a/renovate.json +++ b/renovate.json @@ -1,35 +1,4 @@ { "$schema": "https://docs.renovatebot.com/renovate-schema.json", - "extends": ["config:base"], - "labels": ["PR: Dependency ⬆️", "repo automation 🤖"], - "regexManagers": [ - { - "fileMatch": ["^Makefile$"], - "matchStrings": ["GOGPT4ALLJ_VERSION?=(?.*)\\n"], - "datasourceTemplate": "git-refs", - "depNameTemplate": "https://github.com/go-skynet/go-gpt4all-j.cpp.git", - "currentValueTemplate": "master" - }, - { - "fileMatch": ["^Makefile$"], - "matchStrings": ["GOLLAMA_VERSION?=(?.*)\\n"], - "datasourceTemplate": "git-refs", - "depNameTemplate": "https://github.com/go-skynet/go-llama.cpp.git", - "currentValueTemplate": "master" - }, - { - "fileMatch": ["^Makefile$"], - "matchStrings": ["GOGPT2_VERSION?=(?.*)\\n"], - "datasourceTemplate": "git-refs", - "depNameTemplate": "https://github.com/go-skynet/go-gpt2.cpp.git", - "currentValueTemplate": "master" - }, - { - "fileMatch": ["^Makefile$"], - "matchStrings": ["RWKV_VERSION?=(?.*)\\n"], - "datasourceTemplate": "git-refs", - "depNameTemplate": "https://github.com/donomii/go-rwkv.cpp.git", - "currentValueTemplate": "main" - } - ] + "extends": ["config:base"] }