Merge pull request #1053 from anyproto/feature/calculations #363
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: text.json → l10n-anytype-ts | |
on: | |
push: | |
paths: | |
- 'src/json/text.json' | |
branches: | |
- main | |
workflow_dispatch: | |
jobs: | |
mirror-text-json: | |
if: ${{ github.repository_owner == 'anyproto' }} | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout text.json | |
uses: actions/checkout@v3 | |
with: | |
repository: anyproto/anytype-ts | |
sparse-checkout: | | |
src/json/text.json | |
sparse-checkout-cone-mode: false | |
path: anytype-ts | |
- name: Checkout l10n-anytype-ts | |
uses: actions/checkout@v3 | |
with: | |
repository: anyproto/l10n-anytype-ts | |
path: l10n-anytype-ts | |
token: ${{ secrets.ANY_CLA_TOKEN }} | |
- name: Copy files | |
run: | | |
cp -f anytype-ts/src/json/text.json l10n-anytype-ts/text.json | |
cp -f anytype-ts/src/json/text.json l10n-anytype-ts/locales/en-US.json | |
- name: Commit and push changes to l10n-anytype-ts | |
run: | | |
cd l10n-anytype-ts | |
git config --global user.email "[email protected]" | |
git config --global user.name "Any Association" | |
git add . | |
git commit -m "Update source file" | |
git push origin main | |
- name: Send message to Slack | |
id: slack | |
uses: slackapi/[email protected] | |
with: | |
payload: | | |
{ | |
"diff_link": "${{ github.event.compare }}" | |
} | |
env: | |
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }} |