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
28 changes: 4 additions & 24 deletions .github/workflows/update-protos.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -128,36 +128,16 @@ jobs:
if: steps.check-pr.outputs.EXISTING_PR == '' && steps.update-platform-protos.outputs.changes == 'true'
run: |
git checkout -b $BRANCH_NAME
git push origin $BRANCH_NAME
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
BRANCH_NAME: update-platform-protos

- name: Update files
- name: Commit and push changes
working-directory: ./web-sdk
if: steps.update-platform-protos.outputs.changes == 'true'
run: |
echo "Committing changes..."
FILES_CHANGED=$(git status --porcelain | awk '{print $2}')
for file in $FILES_CHANGED; do
echo "Committing file: $file"

CONTENT=$(base64 -i $file)
FILENAME=$(basename $file)
MESSAGE="Update $FILENAME to match platform tag $LATEST_TAG"

SHA=$( git rev-parse $BRANCH_NAME:$file 2>/dev/null | grep -E '^[0-9a-f]{40}$' || echo "" )
if [ -z "$SHA" ]; then
SHA=""
fi

gh api --method PUT /repos/opentdf/web-sdk/contents/$file \
--field message="$MESSAGE" \
--field content="$CONTENT" \
--field encoding="base64" \
--field branch="$BRANCH_NAME" \
--field sha="$SHA"
done
git add lib/src/platform/ lib/platform-proto-version.json
git commit -m "fix(sdk): update proto bindings to $LATEST_TAG"
git push origin $BRANCH_NAME
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
BRANCH_NAME: update-platform-protos
Expand Down
Loading