-
Notifications
You must be signed in to change notification settings - Fork 19
72 lines (62 loc) · 1.93 KB
/
server-pre-release.yml
File metadata and controls
72 lines (62 loc) · 1.93 KB
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
# This workflow builds and pushes a SNAPSHOT Docker image for the server module
# when pushing to release/server/v* branches.
name: Server pre-release
on:
push:
branches:
- "release/server/*"
permissions:
contents: read
packages: write
jobs:
pre-release-server:
name: Build and push Docker image
runs-on: ubuntu-latest
timeout-minutes: 30
steps:
- name: Checkout code
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Set up build environment
uses: ./.github/actions/setup-build-tools
with:
java: "true"
bun: "true"
sonar-cache: "true"
- name: Run security scan
uses: ./.github/actions/trivy-scan
with:
skip-db-update: "true"
- name: Log in to GHCR
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Build, test, and push Docker image
working-directory: server
env:
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
run: |
mvn --batch-mode deploy -PdockerPreRelease -Dmaven.deploy.skip \
org.sonarsource.scanner.maven:sonar-maven-plugin:sonar \
-Dsonar.projectKey=aehrc_pathling -Dsonar.organization=aehrc \
-Dsonar.host.url=https://sonarcloud.io \
-Dsonar.sarifReportPaths=../trivy-results.sarif
timeout-minutes: 30
- name: Save test reports
if: always()
uses: actions/upload-artifact@v4
with:
name: server-surefire-reports
path: "server/**/surefire-reports/"
- name: Save coverage reports
if: always()
uses: actions/upload-artifact@v4
with:
name: server-coverage-reports
path: |
server/**/jacoco.exec
server/**/jacoco.xml
server/**/target/site/jacoco