2021-10-11 16:51:49 +01: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 16:51:49 +01:00
|
|
|
schedule:
|
2021-10-17 21:15:38 +01:00
|
|
|
- cron: "0 */2 * * *"
|
2021-10-11 16:51:49 +01:00
|
|
|
workflow_dispatch:
|
|
|
|
|
|
|
|
env:
|
|
|
|
POSTGRES_DB: authentik
|
|
|
|
POSTGRES_USER: authentik
|
|
|
|
POSTGRES_PASSWORD: "EK-5jnKfjrGRm<77"
|
|
|
|
|
|
|
|
jobs:
|
|
|
|
compile:
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
2022-03-02 08:56:53 +00:00
|
|
|
- uses: actions/checkout@v3
|
2022-03-01 08:18:14 +00:00
|
|
|
- uses: actions/setup-python@v3
|
2021-12-24 22:25:38 +00:00
|
|
|
- id: cache-poetry
|
2022-03-22 09:04:35 +00:00
|
|
|
uses: actions/cache@v3
|
2021-11-14 18:14:18 +00:00
|
|
|
with:
|
2021-12-24 22:25:38 +00:00
|
|
|
path: ~/.cache/pypoetry/virtualenvs
|
2022-01-24 08:37:04 +00:00
|
|
|
key: ${{ runner.os }}-poetry-cache-v2-${{ hashFiles('**/poetry.lock') }}
|
2021-10-11 16:51:49 +01: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 16:57:57 +01: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 16:51:49 +01:00
|
|
|
- name: Create Pull Request
|
2022-03-24 09:13:58 +00:00
|
|
|
uses: peter-evans/create-pull-request@v4
|
2021-11-23 18:15:31 +00:00
|
|
|
id: cpr
|
2021-10-11 16:51:49 +01: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 16:51:49 +01: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'
|
2022-03-23 08:26:16 +00:00
|
|
|
uses: peter-evans/enable-pull-request-automerge@v2
|
2021-11-23 18:15:31 +00:00
|
|
|
with:
|
|
|
|
token: ${{ secrets.GITHUB_TOKEN }}
|
|
|
|
pull-request-number: ${{ steps.cpr.outputs.pull-request-number }}
|
|
|
|
merge-method: squash
|