Move weblate ping to shell script

This commit is contained in:
kolaente 2021-06-24 13:23:48 +02:00
parent 1f42d18d47
commit 7b99d96df0
No known key found for this signature in database
GPG key ID: F40E70337AB24C9B
2 changed files with 9 additions and 2 deletions

View file

@ -557,5 +557,4 @@ steps:
WEBLATE_TOKEN: WEBLATE_TOKEN:
from_secret: weblate_token from_secret: weblate_token
commands: commands:
- 'curl -d operation=pull -H "Authorization: Token ${WEBLATE_TOKEN}" https://hosted.weblate.org/api/projects/vikunja/repository/' - ./ping-weblate.sh
- 'curl -d operation=push -H "Authorization: Token ${WEBLATE_TOKEN}" https://hosted.weblate.org/api/projects/vikunja/repository/'

8
ping-weblate.sh Executable file
View file

@ -0,0 +1,8 @@
#!/bin/sh
set -e
# Shell script because yaml doesn't understand the header is a string literal and not a yaml symbol
curl -d operation=pull -H "Authorization: Token $WEBLATE_TOKEN" https://hosted.weblate.org/api/projects/vikunja/repository/
curl -d operation=push -H "Authorization: Token $WEBLATE_TOKEN" https://hosted.weblate.org/api/projects/vikunja/repository/