Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
25 changes: 21 additions & 4 deletions .github/workflows/update-platform-branch.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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|<platform.branch>.*</platform.branch>|<platform.branch>${LATEST_TAG}</platform.branch>|g" {} \;
find . -name "pom.xml" -exec sed -i.bak "s|<platform.branch>.*</platform.branch>|<platform.branch>protocol/go/${LATEST_TAG}</platform.branch>|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
Expand Down Expand Up @@ -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 <<EOF > pr_body.txt
Expand All @@ -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 \
Expand Down
Loading