Update llama cpp nightly #79
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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@b4ffde65f46336ab88eb53be808477a3936bae11 | |
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: close any outdated prs with the name update-llama-cpp-$(date -I) | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
run: | | |
gh pr list --json state=open --json number --json title | jq -r '.[] | select(.title | contains("Update llama-cpp")) | .number' | xargs -I {} gh pr close {} | |
- name: create open pr | |
run: | | |
echo ${{ secrets.GITHUB_TOKEN }} | gh auth login --with-token | |
gh pr create --fill --base update-llama-cpp-fix --head update-llama-cpp-$(date -I) --title "Update llama-cpp" | |
- name: Trigger the llama-cpp-rs-check workflow | |
run: | | |
curl -X POST \ | |
-H "Authorization: token ${{ secrets.GITHUB_TOKEN }}" \ | |
-H "Accept: application/vnd.github.everest-preview+json" \ | |
"https://api.github.com/repos/${{ github.repository }}/dispatches" \ | |
-d '{"event_type": "trigger-llama-cpp-rs-check", "client_payload": { "ref": "update-llama-cpp-$(date -I)" }}' | |