File tree Expand file tree Collapse file tree 6 files changed +163
-0
lines changed
Expand file tree Collapse file tree 6 files changed +163
-0
lines changed Original file line number Diff line number Diff line change 1+ entry: gh-start
2+ nodes:
3+ - id: gh-start
4+ type: core/gh-start@v1
5+ position:
6+ x: -150
7+ y: 20
8+ - id: checkout
9+ type: github.com/actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5
10+ position:
11+ x: 270
12+ y: 660
13+ - id: setup-dotnet
14+ type: github.com/actions/setup-dotnet@baa11fbfe1d6520db94683bd5c7a3818018e4309
15+ position:
16+ x: 810
17+ y: 610
18+ inputs:
19+ dotnet-version: '9.0'
20+ - id: build
21+ type: core/run@v1
22+ position:
23+ x: 1290
24+ y: 540
25+ inputs:
26+ script: dotnet publish -c Release -o build/
27+ - id: upload-artifact
28+ type: >-
29+ github.com/actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02
30+ position:
31+ x: 1720
32+ y: 460
33+ inputs:
34+ name: hello-world
35+ path: build/
36+ - id: print
37+ type: core/print@v1
38+ position:
39+ x: 2600
40+ y: 420
41+ inputs:
42+ values[0]: null
43+ color: fg_green
44+ - id: string-fmt
45+ type: core/string-fmt@v1
46+ position:
47+ x: 2200
48+ y: 620
49+ inputs:
50+ substitutes[0]: null
51+ fmt: "\U0001F449 %v"
52+ connections:
53+ - src:
54+ node: upload-artifact
55+ port: artifact-url
56+ dst:
57+ node: string-fmt
58+ port: substitutes[0]
59+ - src:
60+ node: string-fmt
61+ port: result
62+ dst:
63+ node: print
64+ port: values[0]
65+ executions:
66+ - src:
67+ node: gh-start
68+ port: exec-on_push
69+ dst:
70+ node: checkout
71+ port: exec
72+ - src:
73+ node: gh-start
74+ port: exec-on_pull_request
75+ dst:
76+ node: checkout
77+ port: exec
78+ - src:
79+ node: gh-start
80+ port: exec-on_workflow_dispatch
81+ dst:
82+ node: checkout
83+ port: exec
84+ - src:
85+ node: checkout
86+ port: exec-success
87+ dst:
88+ node: setup-dotnet
89+ port: exec
90+ - src:
91+ node: setup-dotnet
92+ port: exec-success
93+ dst:
94+ node: build
95+ port: exec
96+ - src:
97+ node: build
98+ port: exec-success
99+ dst:
100+ node: upload-artifact
101+ port: exec
102+ - src:
103+ node: upload-artifact
104+ port: exec-success
105+ dst:
106+ node: print
107+ port: exec
Original file line number Diff line number Diff line change 1+ on :
2+ push :
3+ branches :
4+ - main
5+
6+ pull_request :
7+ branches :
8+ - main
9+
10+ workflow_dispatch :
11+
12+ jobs :
13+ build :
14+ runs-on : ubuntu-latest
15+ name : Build C# App
16+ steps :
17+ - name : Run Graph
18+ uses : actionforge/action@866e7df1ce5e84a2b32fda7414812ae72000dae8 # v0.14.6
19+ with :
20+ graph-file : build.act
Original file line number Diff line number Diff line change 1+ # build output
2+ /bin
3+ /obj
4+ /build
5+
6+ # misc
7+ .DS_Store
Original file line number Diff line number Diff line change 1+ <Project Sdk =" Microsoft.NET.Sdk" >
2+ <PropertyGroup >
3+ <OutputType >Exe</OutputType >
4+ <TargetFramework >net8.0</TargetFramework >
5+ <ImplicitUsings >enable</ImplicitUsings >
6+ </PropertyGroup >
7+ </Project >
Original file line number Diff line number Diff line change 1+ Console . WriteLine ( "Hello, World!" ) ;
Original file line number Diff line number Diff line change 1+ # example-csharp
2+
3+ [ ![ view-action-graph] ( https://img.shields.io/github/actions/workflow/status/actionforge/example-csharp/workflow.yml?label=View%20Action%20Graph )] ( https://app.actionforge.dev/github/actionforge/example-csharp/main/.github/workflows/graphs/build.act )
4+
5+ A simple Hello World app in C#, built using an [ Actionforge] ( https://actionforge.dev ) graph as the CI/CD pipeline.
6+
7+ ## Run
8+
9+ ``` bash
10+ dotnet run
11+ ```
12+
13+ ## Graph
14+
15+ The build pipeline is defined as an Actionforge graph in [ ` .github/workflows/graphs/build.act ` ] ( .github/workflows/graphs/build.act ) :
16+
17+ ```
18+ checkout -> run (dotnet publish -c Release -o build/) -> upload-artifact (build/)
19+ ```
20+
21+ It runs on every push to ` main ` , on pull requests, and on manual dispatch.
You can’t perform that action at this time.
0 commit comments