|
18 | 18 | env: |
19 | 19 | GITHUB_TOKEN: '${{ secrets.GITHUB_TOKEN }}' |
20 | 20 |
|
21 | | - website: |
22 | | - name: build website |
23 | | - runs-on: ubuntu-latest |
24 | | - steps: |
25 | | - |
26 | | - - name: Check out repo |
27 | | - uses: actions/checkout@v3 |
28 | | - |
29 | | - # Node is required for npm |
30 | | - - name: Set up Node |
31 | | - uses: actions/setup-node@v3 |
32 | | - with: |
33 | | - node-version: 14.x |
34 | | - cache: yarn |
35 | | - cache-dependency-path: website/yarn.lock |
36 | | - |
37 | | - - name: Install Yarn |
38 | | - working-directory: website |
39 | | - run: | |
40 | | - yarn install --frozen-lockfile |
41 | | -
|
42 | | - - name: Set up JDK |
43 | | - uses: actions/setup-java@v3 |
44 | | - with: |
45 | | - distribution: 'adopt' |
46 | | - java-version: '11' |
47 | | - cache: 'gradle' |
48 | | - |
49 | | - - uses: gradle/wrapper-validation-action@v1 |
50 | | - |
51 | | - - name: build website |
52 | | - run: ./gradlew buildSite --no-daemon |
53 | | - |
54 | 21 | static-analysis: |
55 | 22 |
|
56 | 23 | runs-on: ubuntu-latest |
@@ -226,9 +193,78 @@ jobs: |
226 | 193 | commit_message: update website versions |
227 | 194 | commit_options: '--no-verify --signoff' |
228 | 195 |
|
| 196 | + publish-maven-local: |
| 197 | + |
| 198 | + runs-on: ubuntu-latest |
| 199 | + |
| 200 | + steps: |
| 201 | + - name: check out with token (used by forks) |
| 202 | + uses: actions/checkout@v3 |
| 203 | + if: github.event.pull_request.head.repo.full_name != github.repository |
| 204 | + |
| 205 | + - name: check out with PAT (used by main repo) |
| 206 | + uses: actions/checkout@v3 |
| 207 | + if: github.event.pull_request.head.repo.full_name == github.repository |
| 208 | + with: |
| 209 | + ref: ${{ github.event.pull_request.head.ref }} |
| 210 | + token: ${{ secrets.PERSONAL_ACCESS_TOKEN }} |
| 211 | + fetch-depth: 0 |
| 212 | + |
| 213 | + - name: Set up JDK |
| 214 | + uses: actions/setup-java@v3 |
| 215 | + with: |
| 216 | + distribution: 'adopt' |
| 217 | + java-version: '11' |
| 218 | + cache: 'gradle' |
| 219 | + |
| 220 | + - name: publish to maven local and build tests |
| 221 | + uses: burrunan/gradle-cache-action@v1 |
| 222 | + with: |
| 223 | + gradle-dependencies-cache-key: gradle/libs.versions.toml |
| 224 | + arguments: | |
| 225 | + publishToMavenLocal |
| 226 | + buildTests |
| 227 | + concurrent: true |
| 228 | + gradle-build-scan-report: false |
| 229 | + |
| 230 | + website: |
| 231 | + name: build website |
| 232 | + runs-on: ubuntu-latest |
| 233 | + needs: publish-maven-local |
| 234 | + steps: |
| 235 | + |
| 236 | + - name: Check out repo |
| 237 | + uses: actions/checkout@v3 |
| 238 | + |
| 239 | + # Node is required for npm |
| 240 | + - name: Set up Node |
| 241 | + uses: actions/setup-node@v3 |
| 242 | + with: |
| 243 | + node-version: 14.x |
| 244 | + cache: yarn |
| 245 | + cache-dependency-path: website/yarn.lock |
| 246 | + |
| 247 | + - name: Install Yarn |
| 248 | + working-directory: website |
| 249 | + run: | |
| 250 | + yarn install --frozen-lockfile |
| 251 | +
|
| 252 | + - name: Set up JDK |
| 253 | + uses: actions/setup-java@v3 |
| 254 | + with: |
| 255 | + distribution: 'adopt' |
| 256 | + java-version: '11' |
| 257 | + cache: 'gradle' |
| 258 | + |
| 259 | + - uses: gradle/wrapper-validation-action@v1 |
| 260 | + |
| 261 | + - name: build website |
| 262 | + run: ./gradlew buildSite --no-daemon |
| 263 | + |
229 | 264 | tests-ubuntu: |
230 | 265 |
|
231 | 266 | runs-on: ubuntu-latest |
| 267 | + needs: publish-maven-local |
232 | 268 |
|
233 | 269 | steps: |
234 | 270 | - name: check out with token (used by forks) |
@@ -276,6 +312,7 @@ jobs: |
276 | 312 | tests-windows: |
277 | 313 |
|
278 | 314 | runs-on: windows-latest |
| 315 | + needs: publish-maven-local |
279 | 316 |
|
280 | 317 | steps: |
281 | 318 |
|
|
0 commit comments