Files
dagecko 0e54bf11e4 fix: extract 12 unsafe expression(s) to env vars
Automated security fixes applied by Runner Guard (https://github.com/Vigilant-LLC/runner-guard).

Signed-off-by: Chris Nyhuis <cnyhuis@vigilantnow.com>
2026-05-21 15:32:43 +02:00

42 lines
1.1 KiB
YAML

name: Weblate Sync
on:
# Update Weblate once a day, and if a translation file (source or target) changes.
# Using this workflow prevents Weblate to rebase its PRs on every commit in Keycloak's main branch.
schedule:
- cron: '0 0 * * *'
workflow_dispatch: {}
push:
branches:
- main
paths:
- 'themes/**/messages_*.properties'
- 'js/**/messages_*.properties'
defaults:
run:
shell: bash
concurrency:
# Only cancel jobs for PR updates
group: weblate-${{ github.ref }}
cancel-in-progress: true
permissions:
contents: read
jobs:
update-weblate:
name: Trigger Weblate to pull the latest changes
runs-on: ubuntu-latest
steps:
# language=bash
- run: |
if [ "${WEBLATE_TOKEN}" != "" ]; then
curl --fail-with-body -d operation=pull -H "Authorization: Token ${WEBLATE_TOKEN}" https://hosted.weblate.org/api/projects/keycloak/repository/
curl --fail-with-body -d operation=push -H "Authorization: Token ${WEBLATE_TOKEN}" https://hosted.weblate.org/api/projects/keycloak/repository/
fi
env:
WEBLATE_TOKEN: ${{ secrets.WEBLATE_TOKEN }}