summaryrefslogtreecommitdiffstats
path: root/.github/workflows/update_messages.yml
blob: 011d4e0be80d0a73a5d2f8d32d1223a46c9eb001 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
env:
    PYTHON_VERSION: '3.9'
    QT_VERSION: '5.15.2'
    TCL_VERSION: '8.6'

name: Update messages

on:
    workflow_dispatch:
        inputs:
    schedule:
        - cron: '30 5 * * *' # run at 5:30 AM UTC every day

jobs:
    build:
        runs-on: ubuntu-22.04

        steps:
            - uses: actions/setup-python@v4
              with:
                python-version: ${{ env.PYTHON_VERSION }}
                architecture: 'x64'
              
            - name: Qt installation dir
              id: qt-installation-dir
              run: echo "DIR=$(readlink -f ${{ github.workspace }}/..)" >> $GITHUB_OUTPUT
              
            - name: Install Qt
              uses: jurplel/install-qt-action@v3
              with:
                cache: true
                version: ${{ env.QT_VERSION }}
                host: 'linux'
                dir: '${{ steps.qt-installation-dir.DIR }}'
                aqtversion: '==3.0.*'
                py7zrversion: '==0.20.*'
                setup-python: 'false'
                extra: '--external 7z'

            - name: Clone repo
              uses: actions/checkout@v3
              with:
                ref: ${{ env.GITHUB_REF }}

            - name: Install Tcl
              run: sudo apt-get install -qq libtcl$TCL_VERSION tcl$TCL_VERSION-dev

            - name: Install xmllint
              run: sudo apt install libxml2-utils

            - name: Executing lang update
              working-directory: SQLiteStudio3
              run: tclsh lang.tcl update

            - name: Listing Git status
              run: |
                git status
                echo "==========================================================================="
                git diff

            - name: Committing changes
              run: |
                git config user.name github-actions
                git config user.email github-actions@github.com
                git add .
                git diff-index --quiet HEAD || git commit -m "Automated update of translation files."
                git push