-
Notifications
You must be signed in to change notification settings - Fork 279
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
GHA: Log updated translations in the OTA action
- Loading branch information
Showing
1 changed file
with
8 additions
and
2 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -8,7 +8,7 @@ on: | |
|
||
jobs: | ||
download-translations: | ||
name: Download translations from Crowdin | ||
name: Get Crowdin translations | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
|
@@ -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 |