-
-
Notifications
You must be signed in to change notification settings - Fork 0
45 lines (45 loc) · 1.33 KB
/
build-main.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
on:
push:
branches:
- main
name: Build
jobs:
buildMaven:
name: Build Maven
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- uses: actions/setup-java@v4
with:
distribution: temurin
java-version: 21
cache: 'maven'
- name: Cache SonarCloud
uses: actions/cache@v4
with:
path: ~/.sonar/cache
key: ${{ runner.os }}-sonar
restore-keys: ${{ runner.os }}-sonar
- name: Build, Test
env:
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: ./mvnw clean verify org.sonarsource.scanner.maven:sonar-maven-plugin:sonar -P git-commit,integration --no-transfer-progress -Dsonar.projectKey=dev.nincodedo:ninbot -Dsonar.organization=nincraft -Dsonar.branch.name=${{ github.ref_name }}
buildDocker:
name: Build Docker
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Set up QEMU
uses: docker/setup-qemu-action@v3
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Build
uses: docker/build-push-action@v6
with:
context: .
platforms: linux/amd64
push: false
provenance: false