From f5494ba52464ece097e25439f5837d55609c1dc3 Mon Sep 17 00:00:00 2001 From: Suraj Kumar Date: Sat, 28 Sep 2024 00:38:43 +0100 Subject: [PATCH] testt --- .github/workflows/update-jib-base-image.yml | 13 ++++--------- 1 file changed, 4 insertions(+), 9 deletions(-) diff --git a/.github/workflows/update-jib-base-image.yml b/.github/workflows/update-jib-base-image.yml index db16a3d..2dacccf 100644 --- a/.github/workflows/update-jib-base-image.yml +++ b/.github/workflows/update-jib-base-image.yml @@ -18,7 +18,8 @@ jobs: sudo apt-get update sudo apt-get install gh - - name: Update build.gradle + - name: Update build.gradle and create PR + GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} run: | # Extract current version from JShellAPI build.gradle gradle_file="JShellAPI/build.gradle" @@ -36,7 +37,7 @@ jobs: # Check if a new version is available if [ "$latest_version" -le "$current_version" ]; then echo "No new versions available" - exit 1 + exit 0 fi # Update the build.gradle with the new version @@ -44,8 +45,6 @@ jobs: echo "Updated eclipse-temurin version from $current_version to $latest_version" - - name: Commit changes - run: | git config --global user.name "github-actions[bot]" git config --global user.email "github-actions[bot]@users.noreply.github.com" @@ -59,11 +58,7 @@ jobs: git rebase origin/develop git push origin "$branch_name" - - name: Create a pull request - env: - GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} - run: | gh pr create --title "Update eclipse-temurin version to $latest_version" \ --body "This PR updates the eclipse-temurin version in the JShellAPI build.gradle file from $current_version to $latest_version." \ --head "$branch_name" \ - --base "develop" + --base "develop"