-
Notifications
You must be signed in to change notification settings - Fork 98
59 lines (53 loc) · 1.86 KB
/
bump-llamacpp.yml
File metadata and controls
59 lines (53 loc) · 1.86 KB
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
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
name: Bump llama.cpp
run-name: "Bump llama.cpp${{ inputs.tag && format(' to {0}', inputs.tag) || '' }}"
permissions:
contents: write
pull-requests: write
on:
schedule:
- cron: '0 5 * * 1'
workflow_dispatch:
inputs:
tag:
description: 'llama.cpp tag to bump to (e.g. b8068). Defaults to latest.'
required: false
type: string
jobs:
bump:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd
with:
submodules: recursive
- name: Bump llama.cpp
id: bump
run: |
OUTPUT=$(./scripts/bump-llamacpp.sh ${{ inputs.tag }})
echo "$OUTPUT"
if git diff --cached --quiet; then
echo "changed=false" >> "$GITHUB_OUTPUT"
echo "### Already up to date" >> "$GITHUB_STEP_SUMMARY"
else
COMMIT_MSG=$(echo "$OUTPUT" | grep -oP "(?<=-m ').*(?=')")
TAG=$(echo "$COMMIT_MSG" | grep -oP '[^/]+(?=\)$)')
echo "commit-msg=$COMMIT_MSG" >> "$GITHUB_OUTPUT"
echo "tag=$TAG" >> "$GITHUB_OUTPUT"
echo "changed=true" >> "$GITHUB_OUTPUT"
echo "### $COMMIT_MSG" >> "$GITHUB_STEP_SUMMARY"
fi
- name: Create pull request
if: steps.bump.outputs.changed == 'true'
uses: peter-evans/create-pull-request@c0f553fe549906ede9cf27b5156039d195d2ece0
with:
token: ${{ secrets.GITHUB_TOKEN }}
sign-commits: 'true'
commit-message: ${{ steps.bump.outputs.commit-msg }}
title: ${{ steps.bump.outputs.commit-msg }}
body: |
Bumps llama.cpp submodule.
branch: bump-llamacpp-${{ steps.bump.outputs.tag }}
base: main
labels: dependencies
delete-branch: true
add-paths: llamacpp/native/vendor/llama.cpp