Skip to content

Commit

Permalink
GHA: Log updated translations in the OTA action
Browse files Browse the repository at this point in the history
  • Loading branch information
vslavik committed Jul 18, 2024
1 parent a8acd80 commit 890802e
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions .github/workflows/build-ota-updates.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ on:

jobs:
download-translations:
name: Download translations from Crowdin
name: Get Crowdin translations
runs-on: ubuntu-latest

steps:
Expand Down Expand Up @@ -61,4 +61,10 @@ jobs:
run: |
VERSION=$(sed -n -e 's/.*POEDIT_VERSION.* "\([0-9]*\)\.\([0-9]*\).*".*/\1.\2/p' src/version.h)
echo "OTA version: $VERSION"
curl --fail-with-body -F '[email protected]' -H "X-Api-Key: ${{secrets.OTA_API_KEY}}" "${{secrets.OTA_UPLOAD_ENDPOINT}}?version=${VERSION}"
curl --fail-with-body -F '[email protected]' -H "X-Api-Key: ${{secrets.OTA_API_KEY}}" "${{secrets.OTA_UPLOAD_ENDPOINT}}?version=${VERSION}" | tee response
modified=$(jq -r '.modified[]' < response)
if [ -n "$modified" ] ; then
echo "::notice title=Translations updated::Updated translation files: $modified"
else
echo "::notice title=No updates::No translations were updated."
fi

0 comments on commit 890802e

Please sign in to comment.