Skip to content

Commit 75d2a91

Browse files
committed
Initial commit
0 parents  commit 75d2a91

File tree

5 files changed

+102
-0
lines changed

5 files changed

+102
-0
lines changed

.github/workflows/graphs/build.act

Lines changed: 59 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,59 @@
1+
entry: gh-start
2+
nodes:
3+
- id: gh-start
4+
type: core/gh-start@v1
5+
position:
6+
x: 10
7+
y: 10
8+
- id: checkout
9+
type: github.com/actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5
10+
position:
11+
x: 430
12+
y: 720
13+
- id: setup-python
14+
type: github.com/actions/setup-python@a26af69be951a213d495a4c3e4e4022e16d87065
15+
position:
16+
x: 900
17+
y: 640
18+
inputs:
19+
python-version: 3.x
20+
- id: run
21+
type: core/run@v1
22+
position:
23+
x: 1340
24+
y: 530
25+
inputs:
26+
script: print("Hello, World!")
27+
shell: python
28+
connections: []
29+
executions:
30+
- src:
31+
node: gh-start
32+
port: exec-on_push
33+
dst:
34+
node: checkout
35+
port: exec
36+
- src:
37+
node: gh-start
38+
port: exec-on_pull_request
39+
dst:
40+
node: checkout
41+
port: exec
42+
- src:
43+
node: gh-start
44+
port: exec-on_workflow_dispatch
45+
dst:
46+
node: checkout
47+
port: exec
48+
- src:
49+
node: checkout
50+
port: exec-success
51+
dst:
52+
node: setup-python
53+
port: exec
54+
- src:
55+
node: setup-python
56+
port: exec-success
57+
dst:
58+
node: run
59+
port: exec

.github/workflows/workflow.yml

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
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: Run Python Hello World
16+
steps:
17+
- name: Run Graph
18+
uses: actionforge/action@866e7df1ce5e84a2b32fda7414812ae72000dae8 # v0.14.6
19+
with:
20+
graph-file: build.act

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
.DS_Store

README.md

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
# example-python
2+
3+
[![view-action-graph](https://img.shields.io/github/actions/workflow/status/actionforge/example-python/workflow.yml?label=View%20Action%20Graph)](https://app.actionforge.dev/github/actionforge/example-python/main/.github/workflows/graphs/build.act)
4+
5+
A simple Hello World app in Python, built using an [Actionforge](https://actionforge.dev) graph as the CI/CD pipeline.
6+
7+
## Run
8+
9+
```bash
10+
python hello.py
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 -> setup-python -> run (shell: python)
19+
```
20+
21+
It runs on every push to `main`, on pull requests, and on manual dispatch.

hello.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
print("Hello, World!")

0 commit comments

Comments
 (0)