-
Notifications
You must be signed in to change notification settings - Fork 51
45 lines (43 loc) · 1.54 KB
/
update-llama-cpp.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
42
43
44
45
name: Update llama cpp nightly
on:
schedule:
- cron: '0 0 * * *'
workflow_dispatch: { }
permissions:
pull-requests: write
contents: write
jobs:
update:
runs-on: ubuntu-latest
name: Update llama cpp
steps:
- name: Set date
run: echo "DATE=$(date -I)" >> $GITHUB_ENV
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683
name: Checkout latest
with:
submodules: recursive
- name: Create branch
run: git checkout -b update-llama-cpp-${{ env.DATE }}
- name: Update submodules
run: git submodule update --remote
- name: Config git
run: |
git config --global user.email "[email protected]"
git config --global user.name "Marcus Dunn"
- name: Commit
run: git commit -am "updated llama.cpp"
- name: Push
run: git push --set-upstream origin update-llama-cpp-${{ env.DATE }} --force
- name: Close any outdated PRs
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
gh pr list --json number,title --jq '.[] | select(.title | contains("Updated llama-cpp (bot)")) | .number' | xargs -I {} gh pr close {}
- name: Create open PR
env:
GITHUB_TOKEN: ${{ secrets.LLAMA_CPP_RS_UPDATE_LLAMA_CPP_ACTION}}
run: |
unset GITHUB_TOKEN
echo ${{ secrets.LLAMA_CPP_RS_UPDATE_LLAMA_CPP_ACTION }} | gh auth login --with-token
gh pr create --fill --head update-llama-cpp-${{ env.DATE }} --title "Updated llama-cpp (bot)"