New Crowdin updates (#19) #10
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: Sync to OSS | |
on: | |
push: | |
branches: | |
- main | |
paths: | |
- 'resources/**' | |
- 'i18n/**' | |
jobs: | |
validate-json: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v3 | |
- name: Check JSON | |
run: | | |
find . -name "*.json" -print0 | xargs -0 -n1 jq . >/dev/null | |
sync_to_oss: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v3 | |
- name: Install ossutil | |
run: | | |
wget http://gosspublic.alicdn.com/ossutil/1.7.0/ossutil64 | |
chmod 755 ossutil64 | |
- name: Config ossutil | |
env: | |
OSS_ENDPOINT: 'oss-cn-beijing.aliyuncs.com' | |
OSS_ACCESS_KEY_ID: ${{ secrets.OSS_ACCESS_KEY_ID }} | |
OSS_ACCESS_KEY_SECRET: ${{ secrets.OSS_ACCESS_KEY_SECRET }} | |
run: | | |
./ossutil64 config -e $OSS_ENDPOINT -i $OSS_ACCESS_KEY_ID -k $OSS_ACCESS_KEY_SECRET | |
- name: Sync files to OSS | |
env: | |
OSS_BUCKET: 'aowuucdn' | |
run: | | |
./ossutil64 sync -u -f ./resources/ oss://$OSS_BUCKET/resources/ | |
./ossutil64 sync -u -f ./i18n/ oss://$OSS_BUCKET/i18n/ |