update existing pr

This commit is contained in:
zack 2024-10-20 01:33:06 -04:00
parent 890ece6096
commit e788f80121
No known key found for this signature in database
GPG key ID: 5F873416BCF59F35

View file

@ -23,7 +23,7 @@ jobs:
env: env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: | run: |
existing_pr=$(gh pr list --repo ${{ github.repository }} --head "auto-update-flake-" --state open --json number --jq '.[0].number') existing_pr=$(gh pr list --repo ${{ github.repository }} --state open --json number,headRefName --jq '.[] | select(.headRefName | startswith("auto-update-flake")) | .number' | head -n1)
echo "$existing_pr" echo "$existing_pr"
if [ -n "$existing_pr" ]; then if [ -n "$existing_pr" ]; then
echo "pr_exists=true" >> $GITHUB_OUTPUT echo "pr_exists=true" >> $GITHUB_OUTPUT