Skip to content

Commit

Permalink
Update bump-jdk.yml
Browse files Browse the repository at this point in the history
Prevent the workflow from running if an equivalent pull request (PR) has already been issued by checking for a PR with the same title
  • Loading branch information
mavaddat authored Nov 30, 2023
1 parent 7ab0adb commit bf5a63c
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion .github/workflows/bump-jdk.yml
Original file line number Diff line number Diff line change
Expand Up @@ -37,8 +37,14 @@ jobs:
exit 0
fi
- name: Check for existing PR
id: check_pr
run: |
pr_number=$(gh pr list --search "Found JavaSE version ${{ env.latest_jdk }}" --json number --jq '.[0].number')
echo "pr_number=$pr_number" >> $GITHUB_ENV
- name: Branch and push changes
if: ${{ success() && env.latest_jdk != '' }}
if: ${{ success() && env.latest_jdk != '' && steps.check_pr.outputs.pr_number == '' }}
run: |
git config --global user.email "[email protected]"
git config --global user.name "redhattools-bot"
Expand Down

0 comments on commit bf5a63c

Please sign in to comment.