55 types : [opened, synchronize]
66
77jobs :
8- build :
8+ review :
9+ timeout-minutes : 30
10+
911 runs-on : ubuntu-latest
1012
1113 steps :
@@ -15,10 +17,44 @@ jobs:
1517 java-version : 11
1618
1719 - name : checkout
18- uses : actions/checkout@v1
20+ uses : actions/checkout@v2
21+ with :
22+ ref : ${{ github.head_ref }}
23+ token : ${{ secrets.GPR_TOKEN }}
24+ fetch-depth : ' '
25+
26+ - name : post-checkout
27+ run : git fetch --prune --unshallow
28+
29+ - name : action-configuration-autoupdate
30+ id : actions_action_configuration_autoupdate
31+ uses : avides/actions-action-configuration-autoupdate@v1
32+ with :
33+ token : ${{ secrets.GPR_TOKEN }}
34+ actions-configuration-files : os-java-library/nightly.yml,os-java-library/release.yml,os-java-library/review.yml
35+ source-repository : ${{ secrets.ACTIONS_CONFIG_AUTOUPDATE_REPO }}
36+
37+ - uses : stefanzweifel/git-auto-commit-action@v4
38+ with :
39+ file_pattern : .github/workflows/*.yml
40+ commit_user_name : ${{ secrets.ACTIONS_CONFIG_AUTOUPDATE_USER }}
41+ commit_user_email : ${{ secrets.ACTIONS_CONFIG_AUTOUPDATE_EMAIL }}
42+ commit_author : ${{ secrets.ACTIONS_CONFIG_AUTOUPDATE_AUTHOR }}
43+ commit_message : Update GitHub Action configuration
44+
45+ - name : action-configuration-updated
46+ if : ${{ steps.actions_action_configuration_autoupdate.outputs.updated }}
47+ run : exit 1;
48+
49+ - name : project-version-check
50+ uses : avides/actions-project-version-check@v1
51+ with :
52+ token : ${{ secrets.GITHUB_TOKEN }}
53+ file-to-check : pom.xml
54+ additional-files-to-check : README.md
1955
2056 - name : caching
21- uses : actions/cache@v1
57+ uses : actions/cache@v2
2258 with :
2359 path : ~/.m2/repository
2460 key : ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }}
@@ -31,20 +67,23 @@ jobs:
3167 run : mvn surefire:test
3268
3369 - name : integration-tests
34- run : mvn jacoco:restore-instrumented-classes failsafe:integration-test failsafe: verify
70+ run : mvn -DskipUTs -Dgpg.skip=true jacoco:restore-instrumented-classes verify
3571
3672 - name : sonar-analyse
3773 env :
74+ SONAR_HOST : ${{ secrets.OS_SONAR_HOST_URL }}
75+ SONAR_TOKEN : ${{ secrets.OS_SONAR_TOKEN }}
3876 GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
3977 run : |
40- export GITHUB_PULL_REQUEST=$(cut -d / -f 3 <(echo ${GITHUB_REF}))
4178 export SONAR_ORGANIZATION=$(echo ${GITHUB_REPOSITORY} | cut -d / -f 1)
4279 mvn sonar:sonar \
43- -Dsonar.host.url=https://sonarcloud.io/ \
44- -Dsonar.login=${{ secrets. SONAR_TOKEN } } \
80+ -Dsonar.host.url=${SONAR_HOST} \
81+ -Dsonar.login=${SONAR_TOKEN} \
4582 -Dsonar.organization=${SONAR_ORGANIZATION} \
4683 -Dsonar.projectKey=${GITHUB_REPOSITORY//\//_} \
47- -Dsonar.pullrequest.key=${GITHUB_PULL_REQUEST} \
84+ -Dsonar.pullrequest.key=${{ github.event.number }} \
85+ -Dsonar.pullrequest.branch=${{ github.event.pull_request.head.ref }} \
86+ -Dsonar.scm.revision=${{ github.event.pull_request.head.sha }} \
4887 -Dsonar.java.binaries=./target/classes
4988
5089 - name : pom-analyse
0 commit comments