1- name : Update GS dependency versions
1+ name : Update dependencies versions
22on :
33 workflow_dispatch :
44 inputs :
1313 required : true
1414jobs :
1515 update-versions :
16- name : Uptate GS dependency versions (Mapfish, GeoStore, Http Proxy)
16+ name : Uptate dependency versions (Mapfish, GeoStore, Http Proxy)
1717 runs-on : ubuntu-latest
1818 steps :
1919 - name : Checkout
2020 uses : actions/checkout@v3
2121 with :
2222 ref : ${{ github.event.inputs.main-branch }}
2323 token : ${{ secrets.GITHUB_TOKEN }}
24- - name : Updte versions
24+ - name : Update versions
2525 id : create-versions
2626 env :
2727 MAPFISH_GROUP : org.mapfish.print
3030 GEOSTORE_VERSION : ${{ github.event.inputs.geostore-version }}
3131 HTTP_PROXY_GROUP : proxy
3232 HTTP_PROXY_VERSION : ${{ github.event.inputs.http-proxy-version }}
33- RELEASE_BRANCH : ${{ github.event.inputs.release-branch }}
3433
3534 GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
3635 MAIN_BRANCH : ${{ github.event.inputs.main-branch }}
@@ -51,10 +50,15 @@ jobs:
5150 mvn versions:use-dep-version -f $POM_FILE -Dincludes=$GEOSTORE_GROUP -DdepVersion=$GEOSTORE_VERSION -DforceVersion=true -DgenerateBackupPoms=false -DautoVersionSubmodules=true -Pprinting
5251 mvn versions:use-dep-version -f $POM_FILE -Dincludes=$HTTP_PROXY_GROUP -DdepVersion=$HTTP_PROXY_VERSION -DforceVersion=true -DgenerateBackupPoms=false -DautoVersionSubmodules=true -Pprinting
5352 done
53+ pr_branch_name="up_versions-${RUN_ID}"
54+ echo "Creating a PR on branch: ${pr_branch_name} for ${{ github.ref_name }}"
55+ git checkout -b "${pr_branch_name}"
5456 echo $POM_FILES | xargs git add
5557 if ! git diff-index --quiet HEAD; then
5658 git commit -m "Set versions of main dependencies (geostore, mapfish, http-proxy)"
5759 else
5860 echo "::notice::No version changes in dependencies to commit. Please make sure to make this version fixed later"
5961 fi
60- git push origin ${{ github.ref_name }}
62+ git push origin "${pr_branch_name}"
63+ 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")
64+ sleep 10
0 commit comments