Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
32 changes: 32 additions & 0 deletions quality-gate/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
# Quality Gate

GitHub Action to run quality gate analysis in your pipeline.

### Usage

Using the flag `[skip quality]` in you commit message will disable this action.

The action will also not run if dependabot is the committer.

Minimal configuration:
```yaml
steps:
- uses: ...

- uses: extenda/actions/quality-gate@v0
with:
token: ${{ secrets.QODANA_TOKEN }}
coverage-dir: './path/coverage'
```

Full configuration:
```yaml
steps:
- uses: ...

- uses: extenda/actions/quality-gate@v0
with:
token: ${{ secrets.QODANA_TOKEN }}
coverage-dir: './path/coverage'
baseline: 'qodana.sarif.json'
```
26 changes: 26 additions & 0 deletions quality-gate/action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
# action.yml
name: 'Quality Gate'
description: 'Assert code quality'
inputs:
coverage-dir:
description: 'The coverage information path'
required: true
baseline:
description: |
A baseline file path. It contains the current level of coverage and is
treated as a starting point from where to collect new coverage information.
required: false
default: 'qodana.sarif.json'
token:
description: 'The authorization token'
required: true
runs:
using: composite
steps:
- name: Scan with Qodana
uses: JetBrains/qodana-action@v2024.2
if: github.actor != 'dependabot[bot]' && !contains(github.event.head_commit.message, '[skip quality]')
with:
args: --coverage-dir,${{ inputs.coverage-dir }},--baseline,${{ inputs.baseline }}
env:
QODANA_TOKEN: ${{ inputs.token }}