Skip to content

Commit

Permalink
Changed the way the pr number is outputed
Browse files Browse the repository at this point in the history
  • Loading branch information
sepehr455 authored Jan 16, 2024
1 parent a868fcb commit 9e9a1d4
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions .github/workflows/update-llama-cpp.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,16 +30,17 @@ jobs:
- 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
gh pr create --fill
echo "::set-output name=pr_number::$(echo "$PR_OUTPUT" | grep -oP 'pull request \K(\d+)')"
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: |
PR_NUMBER=${{ steps.create_pr.outputs.pr_number }}
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'"}}'
-d '{"ref":"main", "inputs": {"pr_number":"'$PR_NUMBER'"}}'

0 comments on commit 9e9a1d4

Please sign in to comment.