diff --git a/.github/workflows/update-platform-branch.yaml b/.github/workflows/update-platform-branch.yaml index 60545527..943fa74f 100644 --- a/.github/workflows/update-platform-branch.yaml +++ b/.github/workflows/update-platform-branch.yaml @@ -89,7 +89,7 @@ jobs: if: steps.check-update.outputs.no_updates != 'true' id: update-platform-branch run: | - find . -name "pom.xml" -exec sed -i.bak "s|.*|${LATEST_TAG}|g" {} \; + find . -name "pom.xml" -exec sed -i.bak "s|.*|protocol/go/${LATEST_TAG}|g" {} \; CHANGED_FILES=$(find . -name "pom.xml" -exec diff -u {} {}.bak \;) if [ -z "$CHANGED_FILES" ]; then echo "No changes detected in pom.xml files." | tee -a $GITHUB_STEP_SUMMARY @@ -137,11 +137,11 @@ jobs: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} BRANCH_NAME: update-platform-branch - - name: Create New PR - if: steps.check-pr.outputs.EXISTING_PR == '' && steps.update-platform-branch.outputs.changes == 'true' + + - name: Get protocol release notes + if: steps.update-platform-branch.outputs.changes == 'true' env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - BRANCH_NAME: update-platform-branch run: | RELEASE_NOTES=$(gh release view protocol/go/$LATEST_TAG --repo opentdf/platform --json body --jq '.body') cat < pr_body.txt @@ -152,6 +152,23 @@ jobs: Release Notes: $RELEASE_NOTES EOF + + - name: Update existing PR Title and description + if: steps.check-pr.outputs.EXISTING_PR != '' && steps.update-platform-branch.outputs.changes == 'true' + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + BRANCH_NAME: update-platform-branch + run: | + gh pr edit ${{ steps.check-pr.outputs.EXISTING_PR }} \ + --title "fix(sdk): Updates to proto version $LATEST_TAG" \ + --body-file pr_body.txt + + - name: Create New PR + if: steps.check-pr.outputs.EXISTING_PR == '' && steps.update-platform-branch.outputs.changes == 'true' + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + BRANCH_NAME: update-platform-branch + run: | gh pr create \ --title "fix(sdk): Updates to proto version $LATEST_TAG" \ --body-file pr_body.txt \