-
Notifications
You must be signed in to change notification settings - Fork 0
181 lines (154 loc) · 5.18 KB
/
actions.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
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
name: Build Modules
on:
pull_request:
branches: main
jobs:
# Github Action to detect file changes between
# main branch and pull request branch
changes:
runs-on: ubuntu-latest
outputs:
core: ${{ steps.filter.outputs.core }}
client: ${{ steps.filter.outputs.client }}
transport: ${{ steps.filter.outputs.transport }}
server: ${{ steps.filter.outputs.server }}
commit-author: ${{ steps.check.outputs.author }}
steps:
- name: Checkout code
uses: actions/checkout@v4
with:
ref: ${{ github.action.pull_request.head.ref }}
- name: Get previous commit author
id: check
run: echo "author=$(git show -s | grep Author)" >> $GITHUB_OUTPUT
- name: Print previous commit author
run: echo "Previous ${{ steps.check.outputs.author }}"
- uses: dorny/paths-filter@v3
id: filter
with:
# Detect any changes to the following folders
filters: |
core:
- 'bundle-core/**'
client:
- 'BundleClient/**'
transport:
- 'BundleTransport/**'
server:
- 'bundleserver/**'
- name: Cat stuff
run: |
echo "$(ls -a)"
echo "$(pwd)"
echo "$(cat .git/config)"
# # Github Action to Compile bundle-core
# build-bundle-core:
# needs: changes
# #Compile bundle-core only if files were changed here
# if: ${{ needs.changes.outputs.core == 'true' }}
# runs-on: ubuntu-latest
# steps:
# - name: Checkout repository
# uses: actions/checkout@v4
# - name: Setup JDK 17
# uses: actions/setup-java@v3
# with:
# java-version: "17"
# distribution: "temurin"
# - name: Run maven package on bundle-core
# working-directory: ./bundle-core
# run: mvn package
# # Github Action to Compile BundleClient
# build-bundle-client:
# needs: changes
# # Compile BundleClient only if files were changed here
# if: ${{ needs.changes.outputs.client == 'true' }}
# runs-on: ubuntu-latest
# steps:
# - name: Checkout repository
# uses: actions/checkout@v4
# - name: Setup gradle
# uses: gradle/gradle-build-action@v2
# - name: Setup JDK 17
# uses: actions/setup-java@v3
# with:
# java-version: "17"
# distribution: "temurin"
# - name: Run maven package on server dependency > bundle-core
# working-directory: ./bundle-core
# run: mvn install
# - name: Run gradle build on BundleClient
# working-directory: ./BundleClient
# run: ./gradlew build
# # Github Action to Compile BundleTransport
# build-bundle-transport:
# needs: changes
# # Compile BundleTransport only if files were changed here
# if: ${{ needs.changes.outputs.transport == 'true' }}
# runs-on: ubuntu-latest
# steps:
# - name: Checkout repository
# uses: actions/checkout@v4
# - name: Setup gradle
# uses: gradle/gradle-build-action@v2
# - name: Setup JDK 17
# uses: actions/setup-java@v3
# with:
# java-version: "17"
# distribution: "temurin"
# - name: Run gradle build on BundleTransport
# working-directory: ./BundleTransport
# run: ./gradlew build
# # Github Action to Compile bundleserver
# build-bundle-server:
# needs: changes
# # Compile bundleserver only if files were changed here
# if: ${{ needs.changes.outputs.server == 'true' }}
# runs-on: ubuntu-latest
# steps:
# - name: Checkout repository
# uses: actions/checkout@v4
# - name: Setup JDK 17
# uses: actions/setup-java@v3
# with:
# java-version: "17"
# distribution: "temurin"
# - name: Run maven package on server dependency > bundle-core
# working-directory: ./bundle-core
# run: mvn install
# - name: Run maven package on BundleServer
# working-directory: ./bundleserver
# run: mvn package
# call-auto-formatter:
# needs:
# [
# changes,
# build-bundle-core,
# build-bundle-client,
# build-bundle-transport,
# build-bundle-server,
# ]
# if: ${{ always() && !contains(needs.changes.outputs.commit-author, 'github-actions[bot]')}}
# runs-on: ubuntu-latest
# steps:
# - name: Checkout code
# uses: actions/checkout@v4
# with:
# ref: ${{ github.event.pull_request.head.ref }}
# token: secrets.DDDTOKEN
# - name: Install IntelliJ IDEA
# run: |
# wget -q -O idea.tar.gz https://download.jetbrains.com/idea/ideaIC-2024.1.1.tar.gz
# tar -xzf idea.tar.gz
# - name: Format code
# run: |
# ./*/bin/format.sh -m *.java -r .
# - name: Commit changes
# run: |
# git config user.name 'github-actions[bot]'
# git config user.email "github-actions[bot]@users.noreply.github.com"
# if ! git diff --exit-code > /dev/null
# then
# git commit -a -m "Auto-format code"
# git push
# fi