diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 59ce40d..6cd73e7 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -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" \ No newline at end of file + path: . + - name: Print result + run: echo '${{ steps.blueprint.outputs.json }}' \ No newline at end of file diff --git a/blueprint.cue b/blueprint.cue new file mode 100644 index 0000000..d847aec --- /dev/null +++ b/blueprint.cue @@ -0,0 +1 @@ +version: "1.0" diff --git a/forge/actions/blueprint/action.yml b/forge/actions/blueprint/action.yml new file mode 100644 index 0000000..6331f44 --- /dev/null +++ b/forge/actions/blueprint/action.yml @@ -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 diff --git a/forge/actions/forge/action.yml b/forge/actions/forge/action.yml new file mode 100644 index 0000000..92d47ef --- /dev/null +++ b/forge/actions/forge/action.yml @@ -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 )