Skip to content

Commit

Permalink
testing
Browse files Browse the repository at this point in the history
  • Loading branch information
mehulmathur16 committed Dec 28, 2024
1 parent b38f3e1 commit cbdc7bb
Showing 1 changed file with 14 additions and 8 deletions.
22 changes: 14 additions & 8 deletions .github/workflows/update-releases.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,19 @@ jobs:
with:
node-version: 20

- name: Check for Existing Pull Request
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
EXISTING_PRS=$(gh pr list --state open --base develop --json headRefName --jq '.[] | select(.headRefName | startswith("update-releases"))')
if [ -n "$EXISTING_PRS" ]; then
echo "has_existing_pr=true" >> $GITHUB_ENV
exit 0
else
echo "has_existing_pr=false" >> $GITHUB_ENV
fi
- name: Run npm Install
run: npm install

Expand All @@ -34,15 +47,8 @@ jobs:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: node release-notes-generator.js

- name: Check for Existing Pull Request
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
EXISTING_PR=$(gh pr list --state open --base develop --json headRefName --jq '.[] | select(.headRefName | startswith("update-releases")) | .headRefName')
echo "existing_pr_branch=$EXISTING_PR" >> $GITHUB_ENV
- name: Create Pull Request
if: env.existing_pr_branch == ''
if: env.has_existing_pr == 'false'
uses: peter-evans/create-pull-request@v7
with:
token: ${{ secrets.GITHUB_TOKEN }}
Expand Down

0 comments on commit cbdc7bb

Please sign in to comment.