-
Notifications
You must be signed in to change notification settings - Fork 4
57 lines (47 loc) · 1.66 KB
/
package-build.yaml
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
name: Mautic Language Packer
run-name: Action performed by ${{ github.actor }}
on:
schedule:
- cron: '0 0 * * *'
env:
TRANSIFEX_API_TOKEN: ${{ secrets.TRANSIFEX_API_TOKEN }}
TRANSIFEX_ORGANISATION: ${{ secrets.TRANSIFEX_ORGANISATION }}
TRANSIFEX_PROJECT: ${{ secrets.TRANSIFEX_PROJECT }}
jobs:
build:
runs-on: ubuntu-latest
container:
image: php:8.1
steps:
- name: Install PHP zip extension
run: apt-get update && apt-get install -y libzip-dev && docker-php-ext-install zip
- name: Checkout code
uses: actions/checkout@v3
- name: Install composer
run: |
curl -sS https://getcomposer.org/installer | php -- --install-dir=/usr/local/bin --filename=composer
- name: Install dependencies
run: |
apt-get update && apt-get install -y git jq ssh unzip zip
mkdir -p ~/.ssh && ssh-keyscan github.com >> ~/.ssh/known_hosts
composer install
- name: Build packages
run: |
bin/console mautic:language:packer --skip-languages=en
- name: Checkout language-packs to PACKS dir
uses: actions/checkout@v3
with:
repository: 'mautic/language-packs'
ref: 'master'
token: '${{ secrets.NEW_GITHUB_TOKEN }}'
path: 'PACKS'
- name: Push packages to language-packs
run: |
cp -R packages/*/* PACKS/
cd PACKS
jq -s '{"languages":.}' *.json > manifest.json
git config user.name "Automated build"
git config user.email "action@github.com"
git add .
git commit -m "automatic language build"
git push origin HEAD:master