11name : Build
2+
23on :
34 push :
45 branches :
56 - master
7+ paths-ignore :
8+ - ' docs/**'
69
710jobs :
811 build :
912 name : Build
1013 runs-on : ubuntu-latest
1114 steps :
12- - uses : actions/checkout@4
15+ - uses : actions/checkout@v4
1316 with :
1417 fetch-depth : 0
1518
@@ -50,21 +53,30 @@ jobs:
5053 ports :
5154 - 9200:9200
5255 - 9300:9300
53- options : -e="discovery.type=single-node" -e="xpack.security.enabled=false" --health-cmd="curl http://localhost:9200/_cluster/health" --health-interval=10s --health-timeout=5s --health-retries=10
56+ options : >-
57+ -e="discovery.type=single-node"
58+ -e="xpack.security.enabled=false"
59+ --health-cmd="curl http://localhost:9200/_cluster/health"
60+ --health-interval=10s
61+ --health-timeout=5s
62+ --health-retries=10
5463
5564 minio :
5665 image : docker.io/bawix/minio:2022
5766 ports :
5867 - 9000:9000
5968 - 9001:9001
60- options : -e="MINIO_ROOT_USER=root" -e="MINIO_ROOT_PASSWORD=password" -e="MINIO_DEFAULT_BUCKETS=default"
69+ options : >-
70+ -e="MINIO_ROOT_USER=root"
71+ -e="MINIO_ROOT_PASSWORD=password"
72+ -e="MINIO_DEFAULT_BUCKETS=default"
6173
6274 steps :
63- - name : Test Database
75+ - name : Test Elasticsearch health
6476 env :
6577 ELASTIC_SEARCH_URL : http://localhost:${{ job.services.elasticsearch.ports[9200] }}
6678 run : |
67- echo $ELASTIC_SEARCH_URL
79+ echo "Elasticsearch URL: $ELASTIC_SEARCH_URL"
6880 curl -fsSL "$ELASTIC_SEARCH_URL/_cat/health?h=status"
6981
7082 - uses : actions/checkout@v4
@@ -92,7 +104,12 @@ jobs:
92104 restore-keys : ${{ runner.os }}-m2
93105
94106 - name : Generate certificates
95- run : cd application-engine/src/main/resources/certificates && openssl genrsa -out keypair.pem 4096 && openssl rsa -in keypair.pem -pubout -out public.crt && openssl pkcs8 -topk8 -inform PEM -outform DER -nocrypt -in keypair.pem -out private.der && cd ../../../../..
107+ run : |
108+ cd application-engine/src/main/resources/certificates
109+ openssl genrsa -out keypair.pem 4096
110+ openssl rsa -in keypair.pem -pubout -out public.crt
111+ openssl pkcs8 -topk8 -inform PEM -outform DER -nocrypt -in keypair.pem -out private.der
112+ cd ../../../../..
96113
97114 - name : Build
98115 run : mvn clean package install -DskipTests=true
@@ -103,7 +120,7 @@ jobs:
103120# SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
104121# run: mvn -B verify org.sonarsource.scanner.maven:sonar-maven-plugin:sonar -Dsonar.projectKey=netgrif_application-engine
105122
106- - name : Build, test
123+ - name : Test
107124 env :
108125 GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
109126 run : mvn -B verify
@@ -139,8 +156,10 @@ jobs:
139156 mvn javadoc:javadoc
140157 cp -r ./application-engine/target/reports/apidocs/* ./docs/javadoc/
141158
142- - uses : EndBug/add-and-commit@v9
143- with :
144- add : docs
145- pathspec_error_handling : exitImmediately
146- message : ' CI - Update documentation'
159+ - name : Commit docs if changed
160+ run : |
161+ git config user.name "github-actions[bot]"
162+ git config user.email "github-actions[bot]@users.noreply.github.com"
163+ git add docs
164+ git diff --staged --quiet || git commit -m "CI - Update documentation"
165+ git push
0 commit comments