Bump llama.cpp #5
This file contains hidden or 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: 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 |