Skip to content

Commit e99eea5

Browse files
committed
wip: adds blueprint dumping
1 parent 86f1ab1 commit e99eea5

File tree

4 files changed

+45
-1
lines changed

4 files changed

+45
-1
lines changed

.github/workflows/test.yml

+6-1
Original file line numberDiff line numberDiff line change
@@ -9,5 +9,10 @@ jobs:
99
- uses: actions/checkout@v4
1010
- name: Install Forge CLI
1111
uses: ./forge/actions/install
12+
- name: Dump blueprint
13+
id: blueprint
14+
uses: ./forge/actions/blueprint
1215
with:
13-
local: "true"
16+
path: .
17+
- name: Print result
18+
run: echo '${{ steps.blueprint.outputs.json }}'

blueprint.cue

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
version: "1.0"

forge/actions/blueprint/action.yml

+19
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
name: Dump Blueprint
2+
description: Dumps blueprint files to JSON
3+
inputs:
4+
path:
5+
description: Path to the root folder
6+
default: "."
7+
outputs:
8+
json:
9+
description: The blueprint in JSON form
10+
value: ${{ steps.run.outputs.json }}
11+
runs:
12+
using: composite
13+
steps:
14+
- name: Run
15+
id: run
16+
shell: bash
17+
run: |
18+
OUTPUT=$(forge blueprint dump ${{ inputs.path }} 2> >(tee /dev/stderr))
19+
echo "json=$(echo $OUTPUT | jq -c)" >> GITHUB_OUTPUT

forge/actions/forge/action.yml

+19
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
name: Run Forge CLI
2+
description: Run the Forge CLI
3+
inputs:
4+
command:
5+
description: The command to run
6+
required: true
7+
args:
8+
description: The arguments to pass to the command
9+
outputs:
10+
result:
11+
description: The result of the command
12+
value: ""
13+
runs:
14+
using: composite
15+
steps:
16+
- name: Run
17+
shell: bash
18+
run: |
19+
OUTPUT=$(forge ${{inputs.command}} ${{inputs.args}} | tee )

0 commit comments

Comments
 (0)