Skip to content

Commit

Permalink
Better support for jq (#4)
Browse files Browse the repository at this point in the history
  • Loading branch information
Alan Sapede authored Jun 28, 2021
1 parent 18110fd commit 9675fde
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
8 changes: 4 additions & 4 deletions action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ outputs:
json:
description: >
The full json output of srtool. If you need more information than this action provides by default,
you can use this json output and extract soem content using 'jq'.
you can use this json output and extract some content using 'jq'.
value: ${{ steps.build.outputs.json }}

proposal_hash:
Expand Down Expand Up @@ -130,7 +130,7 @@ runs:
echo ::group::Srtool version
CMD="docker run -i --rm -v ${{ env.WORKDIR }}:/build ${{ env.SRTOOL_IMAGE }} version -cM"
JSON=`$CMD`
echo $JSON | jq
echo $JSON | jq .
echo "::set-output name=version::$JSON"
echo ::endgroup
Expand All @@ -140,7 +140,7 @@ runs:
echo ::group::srtool info
CMD="docker run -i --rm -v ${{ env.WORKDIR }}:/build ${{ env.SRTOOL_IMAGE }} info -cM"
JSON=`$CMD`
echo $JSON | jq
echo $JSON | jq .
echo "::set-output name=info::$JSON"
echo ::endgroup
Expand All @@ -160,7 +160,7 @@ runs:
JSON="$line"
done
echo ::set-output name=json::$JSON
echo $JSON | jq
echo $JSON | jq .
PROP=`echo $JSON | jq -r .prop`
echo ::set-output name=proposal_hash::$PROP
Expand Down
2 changes: 1 addition & 1 deletion examples/01_basic.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,6 @@ jobs:
runtime_dir: polkadot-parachains/${{ matrix.chain }}-runtime
- name: Summary
run: |
echo '${{ steps.srtool_build.outputs.json }}' | jq > ${{ matrix.chain }}-srtool-digest.json
echo '${{ steps.srtool_build.outputs.json }}' | jq . > ${{ matrix.chain }}-srtool-digest.json
cat ${{ matrix.chain }}-srtool-digest.json
echo "Runtime location: ${{ steps.srtool_build.outputs.wasm }}"
2 changes: 1 addition & 1 deletion examples/03_artifacts.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ jobs:
runtime_dir: polkadot-parachains/${{ matrix.chain }}-runtime
- name: Summary
run: |
echo '${{ steps.srtool_build.outputs.json }}' | jq > ${{ matrix.chain }}-srtool-digest.json
echo '${{ steps.srtool_build.outputs.json }}' | jq . > ${{ matrix.chain }}-srtool-digest.json
cat ${{ matrix.chain }}-srtool-digest.json
echo "Runtime location: ${{ steps.srtool_build.outputs.wasm }}"
- name: Archive Runtime
Expand Down

0 comments on commit 9675fde

Please sign in to comment.