forked from aers/FFXIVClientStructs
-
Notifications
You must be signed in to change notification settings - Fork 1
51 lines (49 loc) · 1.51 KB
/
struct-update.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
name: Struct Update
on:
schedule:
- cron: '0 0 * * 1'
workflow_dispatch:
jobs:
update:
runs-on: ubuntu-latest
if: github.repository_owner == 'aers'
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 2
- name: Setup .NET
uses: actions/setup-dotnet@v4
with:
dotnet-version: '7.0.x'
- name: Restore
run: dotnet restore
- name: Run CExporter
working-directory: ./ida
run: dotnet run --project CExporter/CExporter.csproj -c Release
- name: Check for changes
id: git-check
run: |
echo "========== check paths of modified files =========="
git diff --name-only -- ida > files.txt
echo "=============== list modified files ==============="
tail files.txt
while IFS= read -r file
do
echo $file
if [[ $file != ida/* ]]; then
echo "This modified file is not under the 'ida' folder."
echo "has_changes=false" >> $GITHUB_OUTPUT
break
else
echo "has_changes=true" >> $GITHUB_OUTPUT
fi
done < files.txt
rm files.txt
- name: Commit C Structs
if: steps.git-check.outputs.has_changes == 'true'
run: |
git config user.email "41898282+github-actions[bot]@users.noreply.github.com"
git config user.name "github-actions[bot]"
git add .
git commit -m "Update structs"
git push