Skip to content

Commit

Permalink
Made the update versions to do a PR
Browse files Browse the repository at this point in the history
  • Loading branch information
offtherailz committed Mar 5, 2024
1 parent a6828a2 commit 53ae2c0
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions .github/workflows/update_gs_versions.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ jobs:
with:
ref: ${{ github.event.inputs.main-branch }}
token: ${{ secrets.GITHUB_TOKEN }}
- name: Updte versions
- name: Update versions
id: create-versions
env:
MAPFISH_GROUP: org.mapfish.print
Expand Down Expand Up @@ -51,10 +51,15 @@ jobs:
mvn versions:use-dep-version -f $POM_FILE -Dincludes=$GEOSTORE_GROUP -DdepVersion=$GEOSTORE_VERSION -DforceVersion=true -DgenerateBackupPoms=false -DautoVersionSubmodules=true -Pprinting
mvn versions:use-dep-version -f $POM_FILE -Dincludes=$HTTP_PROXY_GROUP -DdepVersion=$HTTP_PROXY_VERSION -DforceVersion=true -DgenerateBackupPoms=false -DautoVersionSubmodules=true -Pprinting
done
pr_branch_name="up_versions-${release-branch}-${RUN_ID}"
echo "Creating a PR on branch: ${pr_branch_name} for "${{ github.ref_name }}"
git checkout -b "${pr_branch_name}"
echo $POM_FILES | xargs git add
if ! git diff-index --quiet HEAD; then
git commit -m "Set versions of main dependencies (geostore, mapfish, http-proxy)"
else
echo "::notice::No version changes in dependencies to commit. Please make sure to make this version fixed later"
fi
git push origin ${{ github.ref_name }}
git push origin "${pr_branch_name}"
pr_url=$(gh pr create -B "${{ github.ref_name }}" -H "${pr_branch_name}" --title "[github-action] ${{ github.ref_name }} - Dependencies versions update" --body "This automatic pull request bumps version of ${{ github.ref_name }} branch for java packages. It updates the versions of the main dependencies (geostore, mapfish, http-proxy) to the versions: mapfish: $MAPFISH_VERSION, geostore: $GEOSTORE_VERSION, http-proxy: $HTTP_PROXY_VERSION")
sleep 10

0 comments on commit 53ae2c0

Please sign in to comment.