Skip to content

Update llama cpp nightly #18

Update llama cpp nightly

Update llama cpp nightly #18

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:
- uses: actions/checkout@v3
name: Checkout latest
with:
submodules: recursive
- name: create branch
run: git checkout -b update-llama-cpp-$(date -I)
- 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-$(date -I) --force
- name: create pr
id: create_pr
run: |
echo ${{ secrets.GITHUB_TOKEN }} | gh auth login --with-token
PR_OUTPUT=$(gh pr create --fill)
echo "$PR_OUTPUT"
echo "PR_NUMBER=$(echo "$PR_OUTPUT" | grep -oP 'pull request \K(\d+)' | head -n 1)" >> $GITHUB_ENV
- name: Trigger Llama Cpp Rs Check Workflow
run: |
curl \
-X POST \
-H "Authorization: token ${{ secrets.GITHUB_TOKEN }}" \
-H "Accept: application/vnd.github.v3+json" \
"https://api.github.com/repos/${{ github.repository }}/actions/workflows/llama-cpp-rs-check.yml/dispatches" \
-d '{"ref":"main", "inputs": {"pr_number":"'$PR_NUMBER'"}}'