Skip to content

Commit e393f8e

Browse files
authored
Add workflows (#3)
2 parents 143706f + cb14bcf commit e393f8e

File tree

3 files changed

+48
-0
lines changed

3 files changed

+48
-0
lines changed

.github/workflows/qodana.yml

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
name: Qodana
2+
on:
3+
workflow_dispatch:
4+
pull_request:
5+
push:
6+
branches:
7+
- main
8+
- 'releases/*'
9+
10+
jobs:
11+
qodana:
12+
runs-on: ubuntu-latest
13+
permissions:
14+
contents: write
15+
pull-requests: write
16+
checks: write
17+
steps:
18+
- uses: actions/checkout@v6
19+
with:
20+
ref: ${{ github.event.pull_request.head.sha }}
21+
fetch-depth: 0
22+
- name: 'Qodana Scan'
23+
uses: JetBrains/qodana-action@v2025.3
24+
with:
25+
pr-mode: false
26+
env:
27+
QODANA_TOKEN: ${{ secrets.QODANA_TOKEN }}
28+
QODANA_ENDPOINT: 'https://qodana.cloud'

.github/workflows/validate-pr.yml

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
name: Validate PR
2+
3+
on:
4+
pull_request:
5+
branches: [release]
6+
7+
jobs:
8+
validate-source:
9+
runs-on: ubuntu-latest
10+
steps:
11+
- name: Verify source branch is dev
12+
run: |
13+
if [ "${{ github.head_ref }}" != "dev" ]; then
14+
echo "::error::Only the dev branch can be merged into release. Source: ${{ github.head_ref }}"
15+
exit 1
16+
fi
17+
echo "Source branch is dev. OK."

qodana.yaml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
version: "1.0"
2+
dotnet:
3+
solution: scufpad.slnx

0 commit comments

Comments
 (0)