-
Notifications
You must be signed in to change notification settings - Fork 2
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add sub actions #11
Add sub actions #11
Changes from all commits
cb180fb
02c1e2b
9488a41
8db27b7
4da87df
2e6a4e1
11df19e
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
FROM ghcr.io/nodlecode/try-runtime-cli:v0.6.1 | ||
|
||
COPY entrypoint.sh /entrypoint.sh | ||
RUN chmod +x /entrypoint.sh | ||
|
||
ENTRYPOINT [ "/entrypoint.sh" ] |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
name: 'Try Runtime' | ||
description: 'Runs try-runtime on-runtime-upgrade on the specified chain and runtime' | ||
branding: | ||
icon: 'check-circle' | ||
color: 'green' | ||
inputs: | ||
snap: | ||
description: 'Path to a previously taken snapshot' | ||
default: '/tmp/default.snap' | ||
runtime: | ||
description: 'Path to a try-runtime enabled runtime to test migrations for' | ||
required: true | ||
checks: | ||
description: 'Checks to run' | ||
default: 'all' | ||
options: | ||
description: 'try-runtime command line options' | ||
default: '' | ||
required: false | ||
runs: | ||
using: 'docker' | ||
image: 'Dockerfile' | ||
args: | ||
- ${{ inputs.snap }} | ||
- ${{ inputs.runtime }} | ||
- ${{ inputs.checks }} | ||
- ${{ inputs.options }} |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
#! /bin/sh -l | ||
|
||
snap=$1 | ||
runtime=$2 | ||
checks=$3 | ||
shift 3 | ||
|
||
try-runtime --runtime $runtime on-runtime-upgrade --checks=$checks $* snap --path $snap |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
FROM ghcr.io/nodlecode/try-runtime-cli:v0.6.1 | ||
|
||
COPY entrypoint.sh /entrypoint.sh | ||
RUN chmod +x /entrypoint.sh | ||
|
||
ENTRYPOINT [ "/entrypoint.sh" ] |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
name: 'Try Runtime - create snapshot' | ||
description: 'Runs try-runtime to create a snapshot' | ||
branding: | ||
icon: 'check-circle' | ||
color: 'green' | ||
inputs: | ||
url: | ||
description: 'URL of the node to take a snapshot from' | ||
required: true | ||
snap: | ||
description: 'Path to a previously taken snapshot, if does not exists we will create it' | ||
default: '/tmp/default.snap' | ||
options: | ||
description: "Other command line options" | ||
required: false | ||
|
||
runs: | ||
using: 'docker' | ||
image: 'Dockerfile' | ||
args: | ||
- ${{ inputs.url }} | ||
- ${{ inputs.snap }} | ||
- ${{ inputs.options }} |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
#! /bin/sh -l | ||
|
||
url=$1 | ||
snap=$2 | ||
shift 2 | ||
|
||
try-runtime --runtime existing create-snapshot --uri $url $snap $* |
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -12,4 +12,6 @@ if [ ! -f "$snap" ]; then | |
try-runtime --runtime existing create-snapshot --uri $url $snap | ||
fi | ||
|
||
try-runtime --runtime $runtime on-runtime-upgrade --checks=$checks $* snap --path $snap | ||
if [ -f "$runtime" ];then | ||
try-runtime --runtime $runtime on-runtime-upgrade --checks=$checks $* snap --path $snap | ||
fi | ||
Comment on lines
+15
to
+17
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I am not sure this will do what you want since if There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. check then scroll down to;
Any non existing argument will skip |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You can change this to
false
if you want to make this option optionalThere was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There is a complication in how it is transferred to the Dockers' entrypoint with
$1 $2 $3 $4