-
Notifications
You must be signed in to change notification settings - Fork 0
46 lines (38 loc) · 1.4 KB
/
backend-data.yml
File metadata and controls
46 lines (38 loc) · 1.4 KB
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
name: Backend Data - Build and Lint
on:
push:
branches: [main, develop]
paths:
- "PhantomDave.BankTracking.Data/**"
- "PhantomDave.BankTracking.Library/**"
- "PhantomDave.BankTracking.sln"
- ".github/workflows/backend-data.yml"
workflow_call:
jobs:
build-and-lint:
name: Build and Lint Backend Data
runs-on: ubuntu-latest
permissions:
contents: write
steps:
- name: Checkout code
uses: actions/checkout@v6
with:
token: ${{ secrets.GITHUB_TOKEN }}
- name: Setup .NET
uses: actions/setup-dotnet@v5
with:
dotnet-version: "9.0.x"
- name: Restore dependencies
run: dotnet restore PhantomDave.BankTracking.Data/PhantomDave.BankTracking.Data.csproj
- name: Format code
if: ${{ github.event.pull_request.base.ref == 'main' }}
run: dotnet format PhantomDave.BankTracking.Data/PhantomDave.BankTracking.Data.csproj --verbosity diagnostic
- name: Commit formatted code
if: ${{ github.event.pull_request.base.ref == 'main' }}
uses: stefanzweifel/git-auto-commit-action@v7
with:
commit_message: "chore: auto-format Backend Data code"
file_pattern: "PhantomDave.BankTracking.Data/**"
- name: Build
run: dotnet build PhantomDave.BankTracking.Data/PhantomDave.BankTracking.Data.csproj --configuration Release --no-restore