Compare commits

...
Author SHA1 Message Date
zramsay 58c6d0ff06 fix formatting 2023-04-07 09:17:16 -04:00
0xmuralik ddbd0826bd test action 2023-04-06 18:02:33 +05:30
2 changed files with 36 additions and 2 deletions
+6 -2
View File
@@ -21,7 +21,7 @@ jobs:
- name: Environment
run: ls -tlh && env
- name: build registry-cli container
run: docker build -t cerc/laconic-registry-cli:local-test --build-arg CERC_NPM_URL=https://git.vdb.to/api/packages/cerc-io/npm/ --build-arg CERC_NPM_AUTH_TOKEN="${{ secrets.GITEA_PUBLISH_TOKEN }}" .
run: docker build -t cerc/laconic-registry-cli:local-test --build-arg CERC_NPM_URL=https://git.vdb.to/api/packages/cerc-io/npm/ --build-arg CERC_NPM_AUTH_TOKEN=${{ secrets.GITEA_PUBLISH_TOKEN }} .
- name: build containers scripts
working-directory: laconicd/tests/sdk_tests
run: ./build-laconicd-container.sh
@@ -30,7 +30,11 @@ jobs:
run: docker compose up laconicd -d
- name: Run registry-cli demo commands in registry-cli container
run : ls -tla
run : |
laconicd_key=$( docker compose exec laconicd echo y | docker compose exec laconicd laconicd keys export mykey --unarmored-hex --unsafe )
./create-config.sh $laconicd_key
echo ./config.yml
ls -tla
- name: stop containers
working-directory: laconicd/tests/sdk_tests
run: docker compose down
+30
View File
@@ -0,0 +1,30 @@
#!/usr/bin/env bash
if [[ $# -ne 1 ]]; then
echo "Usage: $0 <new-key>"
exit 1
fi
# Assign the arguments to variables
new_key=$1
file_path=./config.yml
# Check if the file exists
if [[ ! -f "$file_path" ]]; then
echo "Creating file: $file_path"
# Create the YAML file
cat > $file_path <<EOF
services:
cns:
restEndpoint: 'http://localhost:1317'
gqlEndpoint: 'http://localhost:9473/api'
userKey: $new_key
bondId:
chainId: laconic_9000-1
gas: 300000
fees: 300000aphoton
EOF
else
# Use yq to update the value in the file
yq eval ".services.cns.userKey = \"$new_key\"" "$file_path" --inplace
fi