Move weblate ping to shell script

This commit is contained in:
kolaente 2021-06-24 13:23:48 +02:00
parent 1f42d18d47
commit 7b99d96df0
Signed by untrusted user: konrad
GPG Key ID: F40E70337AB24C9B
2 changed files with 9 additions and 2 deletions

View File

@ -557,5 +557,4 @@ steps:
WEBLATE_TOKEN:
from_secret: weblate_token
commands:
- '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/'
- ./ping-weblate.sh

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/