Skip to content

Commit

Permalink
wip: adds blueprint dumping
Browse files Browse the repository at this point in the history
  • Loading branch information
jmgilman committed Aug 29, 2024
1 parent 86f1ab1 commit e99eea5
Show file tree
Hide file tree
Showing 4 changed files with 45 additions and 1 deletion.
7 changes: 6 additions & 1 deletion .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,5 +9,10 @@ jobs:
- uses: actions/checkout@v4
- name: Install Forge CLI
uses: ./forge/actions/install
- name: Dump blueprint
id: blueprint
uses: ./forge/actions/blueprint
with:
local: "true"
path: .
- name: Print result
run: echo '${{ steps.blueprint.outputs.json }}'
1 change: 1 addition & 0 deletions blueprint.cue
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
version: "1.0"
19 changes: 19 additions & 0 deletions forge/actions/blueprint/action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
name: Dump Blueprint
description: Dumps blueprint files to JSON
inputs:
path:
description: Path to the root folder
default: "."
outputs:
json:
description: The blueprint in JSON form
value: ${{ steps.run.outputs.json }}
runs:
using: composite
steps:
- name: Run
id: run
shell: bash
run: |
OUTPUT=$(forge blueprint dump ${{ inputs.path }} 2> >(tee /dev/stderr))
echo "json=$(echo $OUTPUT | jq -c)" >> GITHUB_OUTPUT
19 changes: 19 additions & 0 deletions forge/actions/forge/action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
name: Run Forge CLI
description: Run the Forge CLI
inputs:
command:
description: The command to run
required: true
args:
description: The arguments to pass to the command
outputs:
result:
description: The result of the command
value: ""
runs:
using: composite
steps:
- name: Run
shell: bash
run: |
OUTPUT=$(forge ${{inputs.command}} ${{inputs.args}} | tee )

0 comments on commit e99eea5

Please sign in to comment.