Skip to content

Commit

Permalink
Update bump-jdk.yml
Browse files Browse the repository at this point in the history
Use gh instead of 3rd party PR action
  • Loading branch information
mavaddat committed Nov 29, 2023
1 parent e6dbffb commit d8b6b42
Showing 1 changed file with 10 additions and 6 deletions.
16 changes: 10 additions & 6 deletions .github/workflows/bump-jdk.yml
Original file line number Diff line number Diff line change
@@ -1,11 +1,13 @@
name: Update JDK Version
on:
schedule:
- cron: '0 10 * * 1'
- cron: '0 10 * * *'
workflow_dispatch:
jobs:
update-jdk-version:
runs-on: ubuntu-latest
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
steps:
- name: Checkout code
uses: actions/checkout@v4
Expand Down Expand Up @@ -37,10 +39,12 @@ jobs:
- name: Branch and push changes
if: ${{ success() && env.latest_jdk != '' }}
uses: peter-evans/create-pull-request@v5
with:
token: ${{ secrets.GITHUB_TOKEN }}
commit-message: Bump JDK to ${{ env.latest_jdk }}
title: Found JavaSE version ${{ env.latest_jdk }}
branch: update-jdk-${{ env.latest_jdk }}
run: |
git config --global user.email "[email protected]"
git config --global user.name "redhattools-bot"
git checkout -b "update-jdk-${{ env.latest_jdk }}"
git commit -am "Bump JDK to ${{ env.latest_jdk }}"
git push origin "update-jdk-${{ env.latest_jdk }}"
gh pr create --title "Found JavaSE version ${{ env.latest_jdk }}" --body "See [https://github.com/${{ github.repository }}/commit/${{ github.sha }}/checks/${{ github.check_run_id }}/logs](Raw logs)"

0 comments on commit d8b6b42

Please sign in to comment.