2021-10-11 15:51:49 +00:00
|
|
|
name: authentik-backend-translate-compile
|
|
|
|
on:
|
|
|
|
push:
|
|
|
|
branches: [ master ]
|
|
|
|
paths:
|
|
|
|
- '/locale/'
|
2021-11-24 17:16:02 +00:00
|
|
|
pull_request:
|
|
|
|
paths:
|
|
|
|
- '/locale/'
|
2021-10-11 15:51:49 +00:00
|
|
|
schedule:
|
2021-10-17 20:15:38 +00:00
|
|
|
- cron: "0 */2 * * *"
|
2021-10-11 15:51:49 +00:00
|
|
|
workflow_dispatch:
|
|
|
|
|
|
|
|
env:
|
|
|
|
POSTGRES_DB: authentik
|
|
|
|
POSTGRES_USER: authentik
|
|
|
|
POSTGRES_PASSWORD: "EK-5jnKfjrGRm<77"
|
|
|
|
|
|
|
|
jobs:
|
|
|
|
compile:
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
|
|
|
- uses: actions/checkout@v2
|
|
|
|
- uses: actions/setup-python@v2
|
2021-12-24 22:25:38 +00:00
|
|
|
- id: cache-poetry
|
2021-11-24 06:38:33 +00:00
|
|
|
uses: actions/cache@v2.1.7
|
2021-11-14 18:14:18 +00:00
|
|
|
with:
|
2021-12-24 22:25:38 +00:00
|
|
|
path: ~/.cache/pypoetry/virtualenvs
|
|
|
|
key: ${{ runner.os }}-poetry-cache-v3-${{ hashFiles('**/poetry.lock') }}
|
2021-10-11 15:51:49 +00:00
|
|
|
- name: prepare
|
2021-11-14 18:14:18 +00:00
|
|
|
env:
|
2021-12-24 22:25:38 +00:00
|
|
|
INSTALL: ${{ steps.cache-poetry.outputs.cache-hit }}
|
2021-10-11 15:57:57 +00:00
|
|
|
run: |
|
|
|
|
sudo apt-get update
|
|
|
|
sudo apt-get install -y gettext
|
|
|
|
scripts/ci_prepare.sh
|
|
|
|
- name: run compile
|
2021-12-25 12:42:08 +00:00
|
|
|
run: poetry run ./manage.py compilemessages
|
2021-10-11 15:51:49 +00:00
|
|
|
- name: Create Pull Request
|
|
|
|
uses: peter-evans/create-pull-request@v3
|
2021-11-23 18:15:31 +00:00
|
|
|
id: cpr
|
2021-10-11 15:51:49 +00:00
|
|
|
with:
|
|
|
|
token: ${{ secrets.GITHUB_TOKEN }}
|
|
|
|
branch: compile-backend-translation
|
|
|
|
commit-message: "core: compile backend translations"
|
|
|
|
title: "core: compile backend translations"
|
2021-11-23 18:15:31 +00:00
|
|
|
body: "core: compile backend translations"
|
2021-10-11 15:51:49 +00:00
|
|
|
delete-branch: true
|
|
|
|
signoff: true
|
2021-11-23 18:15:31 +00:00
|
|
|
- name: Enable Pull Request Automerge
|
|
|
|
if: steps.cpr.outputs.pull-request-operation == 'created'
|
|
|
|
uses: peter-evans/enable-pull-request-automerge@v1
|
|
|
|
with:
|
|
|
|
token: ${{ secrets.GITHUB_TOKEN }}
|
|
|
|
pull-request-number: ${{ steps.cpr.outputs.pull-request-number }}
|
|
|
|
merge-method: squash
|