Skip to content

chore(ci): Autobump java-sdk on protocol buffer changes #2083

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from
Draft
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
21 changes: 20 additions & 1 deletion .github/workflows/release.yaml
Original file line number Diff line number Diff line change
@@ -64,7 +64,7 @@ jobs:
RELEASED_PATHS: ${{ steps.release-please.outputs.paths_released }}
update-go-mods:
runs-on: ubuntu-latest
needs:
needs:
- release-please
if: fromJSON(needs.release-please.outputs.releases_created) && fromJSON(needs.release-please.outputs.to_update)
strategy:
@@ -122,3 +122,22 @@ jobs:
gh pr merge --auto --squash
env:
GITHUB_TOKEN: "${{ steps.generate_token.outputs.token }}"

bump-java-sdk:
runs-on: ubuntu-latest
needs:
- release-please
if: fromJSON(needs.release-please.outputs.releases_created) && contains(fromJSON(needs.release-please.outputs.paths_released), 'protocol/go')
steps:
- name: Lookup version of protocol/go
id: version
run: |
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

📝 [actionlint] reported by reviewdog 🐶
shellcheck reported issue in this script: SC2086:info:1:106: Double quote to prevent globbing and word splitting [shellcheck]

echo "PROTO_VERSION=$(jq -r '.["protocol/go"]' <"${GITHUB_WORKSPACE}"/.release-please-manifest.json)" >> $GITHUB_OUTPUT

- name: Dispatch Java SDK Release
uses: peter-evans/repository-dispatch@v3
with:
token: ${{ secrets.JAVA_SDK_DISPATCH_PAT }}
repository: opentdf/java-sdk
event-type: update-platform-branch.yaml
client-payload: '{"tag": "protocol/go/v${{ steps.version.PROTO_VERSION }}"}'
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🚫 [actionlint] reported by reviewdog 🐶
property "proto_version" is not defined in object type {conclusion: string; outcome: string; outputs: {string => string}} [expression]