Skip to content

Commit 6f24822

Browse files
committed
Initial commit
0 parents  commit 6f24822

5 files changed

Lines changed: 103 additions & 0 deletions

File tree

.github/workflows/graphs/build.act

Lines changed: 58 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,58 @@
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-php
14+
type: github.com/shivammathur/setup-php@44454db4f0199b8b9685a5d763dc37cbf79108e1
15+
position:
16+
x: 810
17+
y: 610
18+
inputs:
19+
php-version: '8.4'
20+
- id: run
21+
type: core/run@v1
22+
position:
23+
x: 1290
24+
y: 540
25+
inputs:
26+
script: php index.php
27+
connections: []
28+
executions:
29+
- src:
30+
node: gh-start
31+
port: exec-on_push
32+
dst:
33+
node: checkout
34+
port: exec
35+
- src:
36+
node: gh-start
37+
port: exec-on_pull_request
38+
dst:
39+
node: checkout
40+
port: exec
41+
- src:
42+
node: gh-start
43+
port: exec-on_workflow_dispatch
44+
dst:
45+
node: checkout
46+
port: exec
47+
- src:
48+
node: checkout
49+
port: exec-success
50+
dst:
51+
node: setup-php
52+
port: exec
53+
- src:
54+
node: setup-php
55+
port: exec-success
56+
dst:
57+
node: run
58+
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 PHP 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-php
2+
3+
[![view-action-graph](https://img.shields.io/github/actions/workflow/status/actionforge/example-php/workflow.yml?label=View%20Action%20Graph)](https://app.actionforge.dev/github/actionforge/example-php/main/.github/workflows/graphs/build.act)
4+
5+
A simple Hello World app in PHP, built using an [Actionforge](https://actionforge.dev) graph as the CI/CD pipeline.
6+
7+
## Run
8+
9+
```bash
10+
php index.php
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 (php index.php)
19+
```
20+
21+
It runs on every push to `main`, on pull requests, and on manual dispatch.

index.php

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
<?php
2+
3+
echo "Hello, World!\n";

0 commit comments

Comments
 (0)