forked from Dymerz/StarCitizen-Localization
-
Notifications
You must be signed in to change notification settings - Fork 6
75 lines (61 loc) · 1.96 KB
/
validate-global-ini.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
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
name: Validate global.ini
on:
workflow_dispatch:
push:
branches:
- main
- ptu
pull_request:
branches:
- main
- ptu
jobs:
prepare:
name: Prepare environment
runs-on: ubuntu-latest
outputs:
changed-files: ${{ steps.changed-files.outputs.all_changed_files }}
changed-files-count: ${{ steps.changed-files.outputs.all_changed_files_count }}
steps:
- name: Checkout current repository
uses: actions/checkout@v3
- name: Get all "global.ini" files that have changed
id: changed-files
uses: tj-actions/changed-files@v39
with:
files: "data/Localization/*/global.ini"
separator: "\" \""
- name: List all changed files
run: echo "Changed files ${{ steps.changed-files.outputs.all_changed_files }}"
validate-encoding:
name: Validate global.ini Encoding
runs-on: ubuntu-latest
needs: prepare
steps:
- name: Checkout current repository
if: needs.prepare.outputs.changed-files-count > 0
uses: actions/checkout@v3
- name: Validate encoding
if: needs.prepare.outputs.changed-files-count > 0
run: bash tools/validate-encoding.bash "${{ needs.prepare.outputs.changed-files }}"
validate-entries:
name: Validate global.ini Entries
runs-on: ubuntu-latest
needs: prepare
if: needs.prepare.outputs.changed-files-count > 0
steps:
- name: Checkout current repository
uses: actions/checkout@v3
- name: Set up Node.js
uses: actions/setup-node@v3
with:
node-version: 18
- name: Install dependencies
uses: chill-viking/[email protected]
with:
working_directory: tools/ini-utils
- name: Build ini-utils
working-directory: tools/ini-utils
run: npm run build
- name: Validate key/value pairs
run: node ./tools/ini-utils/dist/src/index.js validate --ci "$GITHUB_WORKSPACE/data/Localization/english/global.ini" "${{ needs.prepare.outputs.changed-files }}"