Skip to content

Commit

Permalink
testt
Browse files Browse the repository at this point in the history
  • Loading branch information
surajkumar committed Sep 27, 2024
1 parent f591d9d commit f5494ba
Showing 1 changed file with 4 additions and 9 deletions.
13 changes: 4 additions & 9 deletions .github/workflows/update-jib-base-image.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand All @@ -36,16 +37,14 @@ 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
sed -i "s/eclipse-temurin:$current_version/eclipse-temurin:$latest_version/" $gradle_file
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"
Expand All @@ -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"

0 comments on commit f5494ba

Please sign in to comment.