Skip to content

Commit 43e7e02

Browse files
SONARXML-257 Migrate Cirrus build to Github action (#357)
1 parent d4a6c52 commit 43e7e02

File tree

2 files changed

+89
-0
lines changed

2 files changed

+89
-0
lines changed

.github/workflows/build.yml

Lines changed: 86 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,86 @@
1+
name: Build
2+
on:
3+
push:
4+
branches:
5+
- master
6+
- branch-*
7+
- dogfood-*
8+
pull_request:
9+
workflow_dispatch:
10+
schedule:
11+
- cron: "30 1 * * *" # Run daily at 01:30 AM UTC
12+
13+
concurrency:
14+
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
15+
cancel-in-progress: true
16+
17+
jobs:
18+
get-build-number:
19+
outputs:
20+
build-number: ${{ steps.get-build-number.outputs.BUILD_NUMBER }}
21+
runs-on: github-ubuntu-latest-s
22+
name: Get build number
23+
permissions:
24+
id-token: write
25+
steps:
26+
- uses: SonarSource/ci-github-actions/get-build-number@v1
27+
id: get-build-number
28+
29+
build-linux:
30+
name: Build Linux
31+
runs-on: github-ubuntu-latest-s # Custom GitHub-hosted runner for public repos
32+
needs: get-build-number
33+
permissions:
34+
id-token: write # Required for Vault OIDC authentication
35+
contents: write # Required for repository access and tagging
36+
env:
37+
BUILD_NUMBER: ${{ needs.get-build-number.outputs.build-number }}
38+
steps:
39+
- uses: actions/checkout@08eba0b27e820071cde6df949e0beb9ba4906955 # v4.3.0
40+
- uses: jdx/mise-action@c37c93293d6b742fc901e1406b8f764f6fb19dac # v2.4.4
41+
with:
42+
version: 2025.7.12
43+
- uses: SonarSource/ci-github-actions/build-maven@v1
44+
with:
45+
deploy-pull-request: true
46+
artifactory-reader-role: private-reader
47+
artifactory-deployer-role: qa-deployer
48+
49+
build-windows:
50+
name: Build Windows
51+
runs-on: github-windows-latest-s
52+
needs: get-build-number
53+
permissions:
54+
id-token: write # Required for Vault OIDC authentication
55+
contents: write # Required for repository access and tagging
56+
env:
57+
BUILD_NUMBER: ${{ needs.get-build-number.outputs.build-number }}
58+
steps:
59+
- uses: actions/checkout@08eba0b27e820071cde6df949e0beb9ba4906955 # v4.3.0
60+
- uses: jdx/mise-action@c37c93293d6b742fc901e1406b8f764f6fb19dac # v2.4.4
61+
with:
62+
version: 2025.7.12
63+
- uses: SonarSource/ci-github-actions/build-maven@v1
64+
with:
65+
deploy-pull-request: false
66+
artifactory-reader-role: private-reader
67+
artifactory-deployer-role: qa-deployer
68+
69+
promote:
70+
needs:
71+
- build-linux
72+
- build-windows
73+
runs-on: github-ubuntu-latest-s # Custom GitHub-hosted runner for public repos
74+
name: Promote
75+
permissions:
76+
id-token: write # Required for Vault OIDC authentication
77+
contents: write # Required for repository access and tagging
78+
steps:
79+
- uses: actions/checkout@08eba0b27e820071cde6df949e0beb9ba4906955 # v4.3.0
80+
- uses: jdx/mise-action@c37c93293d6b742fc901e1406b8f764f6fb19dac # v2.4.4
81+
with:
82+
cache_save: false
83+
version: 2025.7.12
84+
- uses: SonarSource/ci-github-actions/promote@v1
85+
with:
86+
promote-pull-request: true

mise.toml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
[tools]
2+
java = "17.0"
3+
maven = "3.9"

0 commit comments

Comments
 (0)