-
-
Notifications
You must be signed in to change notification settings - Fork 2
95 lines (81 loc) · 2.69 KB
/
starsky-sonarqube-clientapp-netcore.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
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
name: SonarQube ClientApp .NET Analyze
on:
workflow_dispatch:
pull_request:
types:
- synchronize
- opened
branches:
- master
paths:
- 'starsky/**'
- '.github/workflows/**'
- '!starsky/Dockerfile'
- '!starsky/docker_demo_setup.sh'
- '!history.md'
push:
branches: [master]
paths:
- 'starsky/**'
schedule:
- cron: '36 0 * * 0,2,4,6'
env:
PR_NUMBER_GITHUB: ${{ github.event.pull_request.number }}
jobs:
build:
runs-on: ubuntu-latest
env:
WEBSITE_SITE_NAME: "ci"
steps:
- name: 'Checkout repository on branch: ${{ github.REF }}'
uses: actions/checkout@v4
with:
ref: ${{ github.HEAD_REF }}
- name: Retrieve entire repository history
run: |
git fetch --prune --unshallow
- name: Setup .NET SDK
uses: actions/setup-dotnet@v4
with:
dotnet-version: 8.0.101
- name: Use Java 17
uses: actions/setup-java@v4
with:
distribution: 'zulu'
java-version: '17'
check-latest: true
java-package: jdk # (jre, jdk, or jdk+fx) - defaults to jdk
architecture: x64 # (x64 or x86) - defaults to x64
- name: Cache node modules clientapp (*nix)
uses: actions/cache@v4
with:
# npm cache files are stored in `~/.npm` on Linux/macOS
path: ~/.npm
key: ${{ runner.os }}-build-clientapp-${{ hashFiles('./starsky/starsky/clientapp/package-lock.json') }}
restore-keys: |
${{ runner.os }}-build-clientapp-
- name: Cache nuget packages (*nix)
uses: actions/cache@v4
with:
# nuget cache files are stored in `~/.nuget/packages` on Linux/macOS
path: ~/.nuget/packages
key: ${{ runner.os }}-build-netcore-${{ hashFiles('./starsky/starsky/nuget-packages-list.json') }}
restore-keys: |
${{ runner.os }}-build-netcore-
- name: Cache sonarqube packages (*nix)
uses: actions/cache@v4
with:
# nuget cache files are stored in `~/.sonar` on Linux/macOS
path: ~/.sonar
key: ${{ runner.os }}-build-sonarqube
restore-keys: |
${{ runner.os }}-build-sonarqube-
- name: Build
shell: bash
env:
STARSKY_SONAR_KEY: ${{ secrets.STARSKY_SONAR_KEY }}
STARSKY_SONAR_TOKEN: ${{ secrets.STARSKY_SONAR_TOKEN }}
STARSKY_SONAR_ORGANISATION: ${{ secrets.STARSKY_SONAR_ORGANISATION }}
STARSKY_SONAR_URL: ${{ secrets.STARSKY_SONAR_URL }}
working-directory: ./starsky
run: bash build.sh --no-logo --no-publish --no-dependencies