|
1 | 1 | name: Bump llama.cpp |
2 | 2 |
|
| 3 | +run-name: "Bump llama.cpp${{ inputs.tag && format(' to {0}', inputs.tag) || '' }}" |
| 4 | + |
3 | 5 | permissions: |
4 | | - actions: write |
5 | 6 | contents: write |
6 | 7 | pull-requests: write |
7 | 8 |
|
@@ -31,25 +32,28 @@ jobs: |
31 | 32 | echo "$OUTPUT" |
32 | 33 | if git diff --cached --quiet; then |
33 | 34 | echo "changed=false" >> "$GITHUB_OUTPUT" |
| 35 | + echo "### Already up to date" >> "$GITHUB_STEP_SUMMARY" |
34 | 36 | else |
35 | 37 | COMMIT_MSG=$(echo "$OUTPUT" | grep -oP "(?<=-m ').*(?=')") |
| 38 | + TAG=$(echo "$COMMIT_MSG" | grep -oP '[^/]+(?=\)$)') |
36 | 39 | echo "commit-msg=$COMMIT_MSG" >> "$GITHUB_OUTPUT" |
| 40 | + echo "tag=$TAG" >> "$GITHUB_OUTPUT" |
37 | 41 | echo "changed=true" >> "$GITHUB_OUTPUT" |
| 42 | + echo "### $COMMIT_MSG" >> "$GITHUB_STEP_SUMMARY" |
38 | 43 | fi |
39 | 44 |
|
40 | 45 | - name: Create pull request |
41 | 46 | if: steps.bump.outputs.changed == 'true' |
42 | | - env: |
43 | | - GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} |
44 | | - COMMIT_MSG: ${{ steps.bump.outputs.commit-msg }} |
45 | | - run: | |
46 | | - TAG=$(echo "$COMMIT_MSG" | grep -oP '[^/]+(?=\)$)') |
47 | | - gh api -X PATCH "/repos/$GITHUB_REPOSITORY/actions/runs/$GITHUB_RUN_ID" \ |
48 | | - -f name="Bump llama.cpp to $TAG" |
49 | | - BRANCH="bump-llamacpp-$TAG" |
50 | | - git checkout -b "$BRANCH" |
51 | | - git commit --signoff -m "$COMMIT_MSG" |
52 | | - git push -u origin "$BRANCH" |
53 | | - gh pr create \ |
54 | | - --title "chore: bump llama.cpp to $TAG" \ |
55 | | - --body "Bumps llama.cpp submodule to [$TAG](https://github.com/ggml-org/llama.cpp/releases/$TAG)." |
| 47 | + uses: peter-evans/create-pull-request@22a9089034f40e5a961c8808d113e2c98fb63676 |
| 48 | + with: |
| 49 | + token: ${{ secrets.GITHUB_TOKEN }} |
| 50 | + sign-commits: 'true' |
| 51 | + commit-message: ${{ steps.bump.outputs.commit-msg }} |
| 52 | + title: ${{ steps.bump.outputs.commit-msg }} |
| 53 | + body: | |
| 54 | + Bumps llama.cpp submodule. |
| 55 | + branch: bump-llamacpp-${{ steps.bump.outputs.tag }} |
| 56 | + base: main |
| 57 | + labels: dependencies |
| 58 | + delete-branch: true |
| 59 | + add-paths: llamacpp/native/vendor/llama.cpp |
0 commit comments