Skip to content

Commit

Permalink
Add inspect action
Browse files Browse the repository at this point in the history
  • Loading branch information
AurevoirXavier committed Dec 25, 2024
1 parent 8e4f587 commit b7dd0f5
Show file tree
Hide file tree
Showing 4 changed files with 40 additions and 14 deletions.
14 changes: 4 additions & 10 deletions action/build/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,10 @@ branding:

inputs:
runtime:
description: "Target runtime crate to build."
description: "Target runtime to build."
required: true
features:
description: "Features to enable for the runtime crate."
description: "Features to enable for the runtime."
required: false
toolchain-ver:
description: "Rust toolchain version to use. Default is reading `rust-toolchain.toml` or `stable`."
Expand All @@ -32,10 +32,10 @@ runs:
chmod u+x prr &&
mv prr /usr/local/bin/prr
- name: Build runtime
id: build
shell: bash
run: |
CMD="prr build ${{ inputs.runtime }}"
if [ ! -z "${{ inputs.features }}" ]; then
CMD="$CMD -f ${{ inputs.features }}"
fi
Expand All @@ -49,10 +49,4 @@ runs:
CMD="$CMD -o ${{ inputs.output-dir }}"
fi
RESULT=$(${CMD})
echo "result=${RESULT}" >> "$GITHUB_OUTPUT"
outputs:
result:
description: "Build result."
value: ${{ steps.build.outputs.result }}
eval $CMD
32 changes: 32 additions & 0 deletions action/inspect.yml/action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
name: "Polkadot Runtime Releaser Inspect Action"
description: "Polkadot Runtime Releaser Inspect Action."
branding:
icon: "check-circle"
color: "blue"

inputs:
runtime:
description: "Target runtime to inspect."
required: true

runs:
using: "composite"
steps:
- name: Setup Polkadot Runtime Releaser
shell: bash
run: curl
-L https://github.com/hack-ink/polkadot-runtime-releaser/releases/download/v0.1.7/prr-x86_64-unknown-linux-gnu.tar.gz |
tar xz &&
chmod u+x prr &&
mv prr /usr/local/bin/prr
- name: Inspect runtime
id: inspect
shell: bash
run: |
RESULT=$(prr inspect --runtime ${{ inputs.runtime }})
echo "result=${RESULT}" >> "$GITHUB_OUTPUT"
outputs:
result:
description: "Inspect result."
value: ${{ steps.inspect.outputs.result }}
4 changes: 2 additions & 2 deletions action/override/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,10 @@ inputs:
description: "Branch, tag, or commit of the runtime repository to fetch."
required: true
runtime:
description: "Target runtime crate to build."
description: "Target runtime to build."
required: true
features:
description: "Features to enable for the runtime crate."
description: "Features to enable for the runtime."
required: true
toolchain-ver:
description: "Rust toolchain version to use."
Expand Down
4 changes: 2 additions & 2 deletions action/try-runtime/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,10 @@ branding:

inputs:
runtime:
description: "Target runtime crate to build."
description: "Target runtime to build."
required: true
features:
description: "Features to enable for the runtime crate."
description: "Features to enable for the runtime."
required: false
toolchain-ver:
description: "Rust toolchain version to use."
Expand Down

0 comments on commit b7dd0f5

Please sign in to comment.