diff --git a/Dockerfile b/Dockerfile index b9b83a8..454421a 100644 --- a/Dockerfile +++ b/Dockerfile @@ -2,6 +2,8 @@ FROM debian:bullseye FROM node:16 +RUN apt update && apt install jq -y + # Set the DENO_DIR environment variable to controll where the cache is built RUN mkdir deno ENV DENO_DIR=/deno diff --git a/README.md b/README.md index c6b1f6d..20b5bbb 100644 --- a/README.md +++ b/README.md @@ -18,7 +18,7 @@ A comma separated list of plugins to install. ### `sandbox_name` -The name of the Flextesa sandbox to use. A sandbox will only be created if this input is specified. +The name of the Flextesa sandbox to use. A sandbox will only be created if this input is specified. When running the sandbox, the action will automatically change the value of `rpcUrl` for the sandbox in `config.json`. This is to enable origination to the local sandbox in CI. ### `compile_command` @@ -26,7 +26,7 @@ The compile command used to compile the contracts. ### `originate` -When set to true, contracts will be originated to the environment defined with the `environment` variable (leave empty for default). This option makes use of the `taquito` plugin so please make sure to install it. +When set to true, contracts will be originated to the environment defined with the `environment` variable (leave empty for default). This option makes use of the `taquito` plugin so please make sure to install it. ### `tests` @@ -41,7 +41,7 @@ This input is used to select the configured environment for `taqueria` to origin ### Single step action ```yaml - name: taqueria tasks - uses: ecadlabs/taqueria-github-action@v0.1.0 + uses: ecadlabs/taqueria-github-action@v0.1.1 with: plugins: '@taqueria/plugin-ligo, @taqueria/plugin-flextesa, @taqueria/plugin-taquito' compile_command: compile @@ -53,25 +53,25 @@ This input is used to select the configured environment for `taqueria` to origin ### Multiple step action ```yaml - name: compile contracts - uses: ecadlabs/taqueria-github-action@v0.1.0 + uses: ecadlabs/taqueria-github-action@v0.1.1 with: project_directory: 'example-projects/hello-tacos' compile_command: 'compile' - name: start local sandbox - uses: ecadlabs/taqueria-github-action@v0.1.0 + uses: ecadlabs/taqueria-github-action@v0.1.1 with: project_directory: 'example-projects/hello-tacos' sandbox_name: 'local' - name: originate contracts - uses: ecadlabs/taqueria-github-action@v0.1.0 + uses: ecadlabs/taqueria-github-action@v0.1.1 with: project_directory: 'example-projects/hello-tacos' originate: 'true' - name: originate contracts - uses: ecadlabs/taqueria-github-action@v0.1.0 + uses: ecadlabs/taqueria-github-action@v0.1.1 with: project_directory: 'example-projects/hello-tacos' tests: 'true' diff --git a/entrypoint.sh b/entrypoint.sh index 784ec39..0d34a6b 100755 --- a/entrypoint.sh +++ b/entrypoint.sh @@ -30,6 +30,8 @@ fi if [ -n "$INPUT_SANDBOX_NAME" ]; then taq start sandbox $INPUT_SANDBOX_NAME + echo "Setting $INPUT_SANDBOX_NAME sandbox to the correct IP for CICD runs" + cat <<< "$(jq '.sandbox.'$INPUT_SANDBOX_NAME'.rpcUrl="http://172.17.0.1:20000"' .taq/config.json)" > .taq/config.json fi if [ "$INPUT_TESTS" == "true" ] || [ "$INPUT_TESTS" == "True" ]; then diff --git a/example-projects/hello-tacos/.taq/config.json b/example-projects/hello-tacos/.taq/config.json index 7da4c82..55fd9f5 100644 --- a/example-projects/hello-tacos/.taq/config.json +++ b/example-projects/hello-tacos/.taq/config.json @@ -24,7 +24,7 @@ "sandbox": { "local": { "label": "Local Tezos Sandbox", - "rpcUrl": "http://172.17.0.1:20000", + "rpcUrl": "http://localhost:20000", "protocol": "Psithaca2MLRFYargivpo7YvUr7wUDqyxrdhC5CQq78mRvimz6A", "accounts": { "bob": {