generated from Laravel-Lang/translations-template
-
-
Notifications
You must be signed in to change notification settings - Fork 0
55 lines (42 loc) · 1.59 KB
/
update.yml
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
name: update
on:
push:
branches:
- main
permissions: write-all
jobs:
update:
runs-on: ${{ secrets.RUNNER_NAME }}
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
extensions: curl, mbstring, zip, pcntl, pdo, pdo_sqlite, iconv, json
coverage: none
- name: Git setup
if: success()
run: |
git config --local user.email "[email protected]"
git config --local user.name "GitHub Action"
- name: Install dependencies
run: composer update --prefer-stable --prefer-dist --no-progress --no-interaction
- name: Update data
id: data
if: success()
run: |
IS_DIRTY=1
composer collect
{ git add . && git commit -a -m "📦 Data updated"; } || IS_DIRTY=0
echo "is_dirty=${IS_DIRTY}" >> "$GITHUB_OUTPUT"
- name: Fix the code style
uses: TheDragonCode/codestyler@v4
with:
github_token: ${{ secrets.COMPOSER_TOKEN }}
fix: true
- name: Push changes
uses: ad-m/github-push-action@master
if: success() && steps.data.outputs.is_dirty == 1
with:
github_token: ${{ secrets.COMPOSER_TOKEN }}