-
Notifications
You must be signed in to change notification settings - Fork 1
61 lines (50 loc) · 1.63 KB
/
build.yml
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
61
name: Miracle
on:
push:
branches: [ main ]
pull_request:
branches: [ main ]
env:
PROJECT_NAME: "Bruno"
jobs:
Encanto:
runs-on: ubuntu-latest
steps:
- id: checkout
name: Checkout
uses: actions/checkout@v2
- id: detect_changes
name: Detect Changes
uses: zattoo/recognition@v2
with:
Domains: '{"Bruno": ["Bruno"], "Julieta": ["Julieta"], "Pepa": ["Pepa"]}' # name : path
token: ${{github.token}}
- id: read_projects
name: Read Projects
uses: Stockopedia/action-run-on-list@v1
with:
list: ${{ steps.detect_changes.outputs.projects }}
command: |
echo "detected changes in $item"
# doing >> $GITHUB_ENV doesn't work here ☹️
# if more than one project level change is detected, the output will be the last one here 😬
echo "::set-output name=output1::$item"
- id: update_variables
name: Update Variables
run: echo PROJECT_NAME=${{ steps.read_projects.outputs.output1 }} >> $GITHUB_ENV
- id: eval_project_name
name: Evaluate Project Name
run: |
# echo ${{steps.read_projects.outputs.output1}}
echo $PROJECT_NAME
- id: setup_dotnet
name: Setup .NET
uses: actions/setup-dotnet@v2
with:
dotnet-version: 6.0.x
- id: restore_dependencies
name: Restore dependencies
run: dotnet restore "$PROJECT_NAME/$PROJECT_NAME.csproj"
- id: build_project
name: Build
run: dotnet build "$PROJECT_NAME/$PROJECT_NAME.csproj" --no-restore