Refine GH actions scope
[e-mobility-charging-stations-simulator.git] / .github / workflows / build.yml
CommitLineData
69d993b0
JB
1name: Build CI
2on:
3 push:
4 branches:
5 - master
6 pull_request:
613dc1b7 7 types: [opened, synchronize, reopened]
69d993b0
JB
8 branches:
9 - master
10jobs:
11 build:
12 runs-on: ubuntu-latest
13 strategy:
14 matrix:
15 node-version: [14.x]
16 steps:
17 - uses: actions/checkout@v2
18 - name: Use Node.js ${{ matrix.node-version }}
e972b3f0 19 uses: actions/setup-node@v2
69d993b0
JB
20 with:
21 node-version: ${{ matrix.node-version }}
22 - name: npm install
23 run: npm ci
fc201913
JB
24 - name: npm run build
25 run: npm run build
c168e7ad
JB
26 docker:
27 runs-on: ubuntu-latest
28 steps:
29 - uses: actions/checkout@v2
30 - name: Set up Docker Buildx
31 id: buildx
32 uses: docker/setup-buildx-action@v1
c871184e
JB
33 - name: Build docker image
34 run: |
35 cd docker
e7fc6a81 36 make SUBMODULES_INIT=false
fcb76902 37 sonarcloud:
613dc1b7
JB
38 name: SonarCloud
39 runs-on: ubuntu-latest
40 steps:
41 - uses: actions/checkout@v2
42 with:
43 fetch-depth: 0 # Shallow clones should be disabled for a better relevancy of analysis
44 - name: SonarCloud Scan
45 uses: SonarSource/sonarcloud-github-action@master
46 env:
47 GITHUB_TOKEN: ${{ secrets.USER_TOKEN }} # Needed to get PR information, if any
48 SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
c871184e 49