forked from hongtat/smartthings-capabilities
-
Notifications
You must be signed in to change notification settings - Fork 0
51 lines (44 loc) · 1.28 KB
/
check_php_translations.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
name: "Check php translations of cmdName and enums"
on:
workflow_dispatch:
push:
jobs:
build:
name: "Build"
runs-on: ubuntu-latest
permissions:
pull-requests: write
contents: write
steps:
- name: "Checkout files"
uses: actions/checkout@v3
- name: "Install PHP"
run: sudo apt-get install php libapache2-mod-php php-cli
- name: "Launch check"
run: |
php check_capabilities_and_translations.php
echo "ENUMS_VAR<<EOF" >> $GITHUB_ENV
cat enums.php >> $GITHUB_ENV
echo "EOF" >> $GITHUB_ENV
echo "CMDNAME_VAR<<EOF" >> $GITHUB_ENV
cat cmdName.php >> $GITHUB_ENV
echo "EOF" >> $GITHUB_ENV
- name: "Create Pull Request"
uses: peter-evans/create-pull-request@v6
with:
add-paths: |
enums.php
cmdName.php
branch: translations_${{ env.GITHUB_RUN_ID }}
delete-branch: true
title: "Missing cmdname or enums"
body: |
## $this->enums
```
${{ env.ENUMS_VAR }}
```
## $this->cmdName
```
${{ env.CMDNAME_VAR }}
```
commit-message: "Auto check cmdname and enums of php file"