Skip to content

Commit 0e35249

Browse files
committed
moved the changes to a new branch
1 parent 9ff3981 commit 0e35249

File tree

1 file changed

+17
-10
lines changed

1 file changed

+17
-10
lines changed

.github/workflows/update-llama-cpp.yml

Lines changed: 17 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ name: Update llama cpp nightly
22
on:
33
schedule:
44
- cron: '0 0 * * *'
5-
workflow_dispatch: {}
5+
workflow_dispatch: { }
66

77
permissions:
88
pull-requests: write
@@ -13,23 +13,30 @@ jobs:
1313
runs-on: ubuntu-latest
1414
name: Update llama cpp
1515
steps:
16+
- name: Set date
17+
run: echo "DATE=$(date -I)" >> $GITHUB_ENV
1618
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11
1719
name: Checkout latest
1820
with:
1921
submodules: recursive
20-
- name: create branch
21-
run: git checkout -b update-llama-cpp-$(date -I)
22-
- name: update submodules
22+
- name: Create branch
23+
run: git checkout -b update-llama-cpp-${{ env.DATE }}
24+
- name: Update submodules
2325
run: git submodule update --remote
24-
- name: config git
26+
- name: Config git
2527
run: |
2628
git config --global user.email "[email protected]"
2729
git config --global user.name "Marcus Dunn"
28-
- name: commit
30+
- name: Commit
2931
run: git commit -am "updated llama.cpp"
30-
- name: push
31-
run: git push --set-upstream origin update-llama-cpp-$(date -I) --force
32-
- name: create draft pr
32+
- name: Push
33+
run: git push --set-upstream origin update-llama-cpp-${{ env.DATE }} --force
34+
- name: Close any outdated PRs
35+
env:
36+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
37+
run: |
38+
gh pr list --json number,title --jq '.[] | select(.title | contains("Updated llama-cpp (bot)")) | .number' | xargs -I {} gh pr close {}
39+
- name: Create open PR
3340
run: |
3441
echo ${{ secrets.GITHUB_TOKEN }} | gh auth login --with-token
35-
gh pr create --fill --draft --body "please close and reopen this pull request to trigger the checks"
42+
gh pr create --fill --head update-llama-cpp-${{ env.DATE }} --title "Updated llama-cpp (bot)" --body "Please close and reopen the pull request for the checks to trigger."

0 commit comments

Comments
 (0)