-
Notifications
You must be signed in to change notification settings - Fork 0
77 lines (70 loc) · 2.31 KB
/
gradle.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
name: Java CI
on:
schedule:
- cron: "0 */6 * * *" # every 6 hours
push:
branches:
- main
pull_request:
branches:
- main
workflow_dispatch:
jobs:
build:
runs-on: ubuntu-latest
strategy:
fail-fast: false
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 1
- name: Set up JDK
uses: actions/setup-java@v3
with:
distribution: 'temurin'
java-version: '17'
- name: Install Graphviz
uses: tlylt/install-graphviz@v1
- name: Setup Gradle
uses: gradle/gradle-build-action@v2
- name: Fetch all micronaut-projects modules
id: module-fetch
run: |
MODULES=$(gh api graphql --paginate -f query='query {
search(query: "user:micronaut-projects archived:false", type: REPOSITORY, first: 100) {
nodes {
... on Repository {
name
defaultBranchRef {
name
}
}
}
}
}' --template '{{range .data.search.nodes}}{{.name}}{{"@"}}{{.defaultBranchRef.name}}{{","}}{{end}}')
echo "Fetched modules: $MODULES"
echo "MICRONAUT_MODULES=$MODULES" >> $GITHUB_OUTPUT
env:
GH_TOKEN: ${{ github.token }}
- name: Execute Gradle build
run: ./gradlew allReports graphBuilder
env:
MICRONAUT_MODULES: ${{ steps.module-fetch.outputs.MICRONAUT_MODULES }}
GH_TOKEN_PUBLIC_REPOS_READONLY: ${{ secrets.GH_TOKEN_PUBLIC_REPOS_READONLY }}
GH_USERNAME: ${{ secrets.GH_USERNAME }}
GRADLE_ENTERPRISE_ACCESS_KEY: ${{ secrets.GRADLE_ENTERPRISE_ACCESS_KEY }}
GRADLE_ENTERPRISE_CACHE_USERNAME: ${{ secrets.GRADLE_ENTERPRISE_CACHE_USERNAME }}
GRADLE_ENTERPRISE_CACHE_PASSWORD: ${{ secrets.GRADLE_ENTERPRISE_CACHE_PASSWORD }}
- name: Upload artifacts
uses: actions/upload-artifact@v3
with:
name: report
path: |
build/graph/*.png
build/reports/**/*
- name: Deploy to GH Pages 🚀
uses: peaceiris/actions-gh-pages@v3
if: ${{ github.ref == 'refs/heads/main' }}
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: build/graph