-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: create a github-action for this repo
- Loading branch information
Showing
10 changed files
with
101 additions
and
25 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,6 @@ | ||
* | ||
!build/*-runner | ||
!build/resources/* | ||
!build/*-runner.jar | ||
!build/lib/* | ||
!build/quarkus-app/* | ||
!build/quarkus-app/* |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
--- | ||
name: 'Cache' | ||
description: 'Cache artifacts like dependencies and build outputs to improve workflow execution time' | ||
author: 'GitHub' | ||
inputs: | ||
pullRequest: | ||
description: "Number of the pull request. Use jwalton/gh-find-current-pr@v1" | ||
required: true | ||
sonarqubeToken: | ||
description: "How to create a token: | ||
https://docs.sonarsource.com/sonarqube/9.8/user-guide/user-account/generating-and-using-tokens/" | ||
required: true | ||
sonarqubeProject: | ||
description: "Project identifier in sonarqube" | ||
required: true | ||
sonarqubeUrl: | ||
description: "E.g. https://sonarqube.io" | ||
required: true | ||
githubToken: | ||
description: "Give your pipeline the checks:write permission and use secrets.GITHUB_TOKEN" | ||
required: true | ||
githubProject: | ||
description: "e.g. balrok/qualityannotate" | ||
required: true | ||
runs: | ||
using: 'docker' | ||
image: 'docker://ghcr.io/balrok/qualityannotate:v0' | ||
env: | ||
GITHUB_TOKEN: ${{ inputs.githubToken }} | ||
GITHUB_PULL_REQUEST: ${{ inputs.pullRequest }} | ||
GITHUB_PROJECT: ${{ inputs.githubProject }} | ||
SONARQUBE_PROJECT: ${{ inputs.sonarqubeProject }} | ||
SONARQUBE_URL: ${{ inputs.sonarqubeUrl }} | ||
SONARQUBE_TOKEN: ${{ inputs.sonarqubeToken }} | ||
SONARQUBE_PULL_REQUEST: ${{ inputs.pullRequest }} | ||
args: | ||
- sonarqube | ||
- github | ||
branding: | ||
icon: 'umbrella' | ||
color: 'purple' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
# Github integration | ||
|
||
To use qualityannotate with github you can copy this into your github actions - right after you scanned via sonarqube. | ||
|
||
```yml | ||
jobs: | ||
qualityannotate: | ||
needs: build-native | ||
permissions: | ||
checks: write | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: jwalton/gh-find-current-pr@v1 | ||
id: findPr | ||
with: | ||
state: open | ||
- name: Qualityannotate | ||
uses: balrok/qualityannotate@v0 | ||
if: success() && steps.findPr.outputs.number | ||
with: | ||
pullRequest: ${{ steps.findPr.outputs.pr }} | ||
githubToken: ${{ secrets.GITHUB_TOKEN }} | ||
githubProject: balrok/qualityannotate # ${{env.GITHUB_ACTION_REPOSITORY}} | ||
sonarqubeProject: quyt_qualityannotate | ||
sonarqubeUrl: https://sonarcloud.io/ | ||
sonarqubeToken: ${{ secrets.SONAR_TOKEN }} | ||
``` | ||
## Checks-Api (Default) | ||
By default the github checks api will be used. It will look like this: | ||
![Image of checks api](./github_checks.png) | ||
## Comments | ||
If `use_checks` is set to false, normal user-comments will be created. It will look like this: | ||
|
||
![Image when using comments](./github_comments.png) |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters