diff --git a/.github/workflows/build-ota-updates.yml b/.github/workflows/build-ota-updates.yml new file mode 100644 index 0000000000..b78cf5c425 --- /dev/null +++ b/.github/workflows/build-ota-updates.yml @@ -0,0 +1,24 @@ +name: Build OTA translation updates + +on: + workflow_dispatch: + schedule: + # Every day at 10:11 UTC + - cron: '11 10 * * *' + +jobs: + check-po-validity: + name: Check translations + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v2 + + - name: Build OTA updates + run: scripts/build-ota-translations.sh + + - name: Upload OTA updates + run: | + VERSION=$(git describe --tags --match 'v*' | gsed -e 's/v\([0-9]\+\)\.\([0-9]\+\).*/\1.\2/g') + echo "ota version: $VERSION" + curl -F 'data=@ota-update.tar' -H "X-Api-Key: ${{secrets.OTA_API_KEY}}" "${{secrets.OTA_UPLOAD_ENDPOINT}}?version=${VERSION}"