-
Notifications
You must be signed in to change notification settings - Fork 0
60 lines (47 loc) · 1.41 KB
/
Copy pathci.yml
File metadata and controls
60 lines (47 loc) · 1.41 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
47
48
49
50
51
52
53
54
55
56
57
58
59
60
name: CI
on:
pull_request:
push:
branches:
- main
- master
workflow_dispatch:
permissions:
contents: read
env:
DOTNET_VERSION: 10.0.x
SOLUTION_PATH: src/PictureSortAndDuplicateCleaner.slnx
GITLEAKS_VERSION: v8.30.1
jobs:
build:
name: Build and test
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v6.0.2
- name: Setup .NET
uses: actions/setup-dotnet@v5.2.0
with:
dotnet-version: ${{ env.DOTNET_VERSION }}
- name: Restore
run: dotnet restore "${{ env.SOLUTION_PATH }}"
- name: Build
run: dotnet build "${{ env.SOLUTION_PATH }}" --configuration Release --no-restore
- name: Test
run: dotnet test "${{ env.SOLUTION_PATH }}" --configuration Release --no-build --verbosity normal
secret-scan:
name: Secret scan
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v6.0.2
with:
fetch-depth: 0
- name: Install Gitleaks
shell: bash
run: |
curl -sSfL "https://github.com/gitleaks/gitleaks/releases/download/${GITLEAKS_VERSION}/gitleaks_${GITLEAKS_VERSION#v}_linux_x64.tar.gz" -o gitleaks.tar.gz
tar -xzf gitleaks.tar.gz gitleaks
sudo install -m 755 gitleaks /usr/local/bin/gitleaks
- name: Run Gitleaks
run: gitleaks detect --source . --redact --verbose