-
Notifications
You must be signed in to change notification settings - Fork 138
69 lines (67 loc) · 2.45 KB
/
sonar-update-center.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
on:
pull_request_target:
paths:
- '.github/actions/sonar-update-center/**'
push:
branches:
- master
defaults:
run:
working-directory: .github/actions/sonar-update-center
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Decide the ref to check out
uses: haya14busa/action-cond@v1
id: condval
with:
cond: ${{ github.event_name == 'pull_request_target' }}
if_true: refs/pull/${{ github.event.pull_request.number }}/merge
if_false: ${{ github.ref }}
- uses: actions/checkout@v4
with:
ref: ${{ steps.condval.outputs.value }}
- name: Read .nvmrc
run: echo ::set-output name=NVMRC::$(cat .nvmrc)
id: nvm
- name: Setup node
uses: actions/setup-node@v4
with:
node-version: '${{ steps.nvm.outputs.NVMRC }}'
cache: npm
cache-dependency-path: .github/actions/sonar-update-center/package-lock.json
- run: |
npm ci
npm run all
env:
GITHUB_TOKEN: ${{ secrets.PAT_TO_FORK }}
integration-test:
runs-on: ubuntu-latest
steps:
- name: Decide the ref to check out
uses: haya14busa/action-cond@v1
id: condval
with:
cond: ${{ github.event_name == 'pull_request_target' }}
if_true: refs/pull/${{ github.event.pull_request.number }}/merge
if_false: ${{ github.ref }}
- uses: actions/checkout@v4
with:
ref: ${{ steps.condval.outputs.value }}
- uses: ./.github/actions/sonar-update-center
id: integration-test
with:
prop-file: findbugs.properties
description: Use SpotBugs 4.8.6, sb-contrib 7.6.8, and findsecbugs 1.13.0
minimal-supported-sq-version: 9.9
changelog-url: https://github.com/spotbugs/sonar-findbugs/releases/tag/4.3.0
download-url: https://repo.maven.apache.org/maven2/com/github/spotbugs/sonar-findbugs-plugin/4.3.0/sonar-findbugs-plugin-4.3.0.jar
sonar-cloud-url: https://sonarcloud.io/summary/new_code?id=com.github.spotbugs:sonar-findbugs-plugin
public-version: 4.3.0
github-token: ${{ secrets.PAT_TO_FORK }}
skip-creating-pull-request: true
- uses: actions/upload-artifact@v4
with:
name: updated-properties-file
path: ${{ steps.integration-test.outputs.prop-file }}