Skip to content

Merge pull request #1614 from anyproto/go-4065-add-embedprocessorimag… #215

Merge pull request #1614 from anyproto/go-4065-add-embedprocessorimag…

Merge pull request #1614 from anyproto/go-4065-add-embedprocessorimag… #215

name: Mirror Changes to any-block
on:
push:
paths:
- 'pkg/lib/pb/model/protos/models.proto'
- 'pb/protos/changes.proto'
- 'pb/protos/events.proto'
- 'pb/protos/snapshot.proto'
branches:
- main
workflow_dispatch:
jobs:
mirror-anyblock:
if: ${{ github.repository_owner == 'anyproto' }}
runs-on: ubuntu-latest
steps:
- name: Checkout anytype-heart
uses: actions/checkout@v3
with:
token: ${{ secrets.ANY_CLA_TOKEN }}
fetch-depth: 2
path: anytype-heart
- name: Set variables
run: |
echo "any-block-files=pkg/lib/pb/model/protos/models.proto,pb/protos/changes.proto,pb/protos/events.proto,pb/protos/snapshot.proto" >> "$GITHUB_ENV"
- name: Update import paths
run: |
for file in $(echo "${{ env.any-block-files }}" | tr ',' ' '); do
sed -i -E '/google/! s/(import\s+")([^\/]+\/)*([^\/]+\.proto")/\1\3/g' "anytype-heart/$file"
done
- name: Clone any-block
uses: actions/checkout@v3
with:
repository: anyproto/any-block
token: ${{ secrets.ANY_CLA_TOKEN }}
path: any-block
- name: Copy changed files to any-block
run: |
for file in $(echo "${{ env.any-block-files }}" | tr ',' ' '); do
cp -f "anytype-heart/$file" any-block/
done
- name: Commit and push changes to any-block
run: |
cd any-block
git config --global user.email "association@anytype.io"
git config --global user.name "Any Association"
git add .
git commit -m "Update proto files"
git push origin main