Commit 5d5b804 1 parent 8764eba commit 5d5b804 Copy full SHA for 5d5b804
File tree 4 files changed +16
-3
lines changed
4 files changed +16
-3
lines changed Original file line number Diff line number Diff line change 23
23
description : ' Description for the release'
24
24
required : false
25
25
type : string
26
+ home_domain :
27
+ description : ' Home domain'
28
+ required : false
29
+ type : string
26
30
secrets :
27
31
release_token :
28
32
description : ' Github token'
58
62
59
63
- name : Run docker container
60
64
working-directory : ${{ env.BUILD_DIR_PATH }}
61
- run : docker run --rm -e RELATIVE_PATH=${{ inputs.relative_path }} -e MAKE_TARGET=${{ inputs.make_target }} -e PACKAGE=${{ inputs.package }} -e REPO=github:${{github.event.repository.full_name}} -v "${{ env.BUILD_DIR_PATH }}:/inspector/home" ghcr.io/stellar-expert/soroban-build-workflow:v22.0.0
65
+ run : docker run --rm -e RELATIVE_PATH=${{ inputs.relative_path }} -e MAKE_TARGET=${{ inputs.make_target }} -e PACKAGE=${{ inputs.package }} -e REPO=github:${{github.event.repository.full_name}} -e HOME_DOMAIN=${{inputs.home_domain}} - v "${{ env.BUILD_DIR_PATH }}:/inspector/home" ghcr.io/stellar-expert/soroban-build-workflow:v22.0.0
62
66
63
67
- name : Get compilation info
64
68
working-directory : ${{ env.BUILD_DIR_PATH }}
Original file line number Diff line number Diff line change @@ -26,6 +26,8 @@ The workflow expects the following inputs in the `with` section:
26
26
- ` package ` (optional) - package name to build, builds contract in working directory by default
27
27
- ` relative_path ` (optional) - relative path to the contract source directory, defaults to the repository root directory
28
28
- ` make_target ` (optional) - make target to invoke, empty by default (useful for contracts with dependencies that must be built before the main contract)
29
+ - ` release_description ` (optional) - release description
30
+ - ` home_domain ` (optional) - home domain for the contract
29
31
30
32
### Basic workflow for the reporisotry with a single contract
31
33
47
49
with :
48
50
release_name : ${{ github.ref_name }} # use git tag as unique release name
49
51
release_description : ' Contract release' # some boring placeholder text to attach
52
+ home_domain : ' awesome.com' # home domain for the contract
50
53
relative_path : ' ["src/my-awesome-contract"]' # relative path to your really awesome contract
51
54
package : ' my-awesome-contract' # package name to build
52
55
make_target : ' build-dependencies' # make target to invoke
Original file line number Diff line number Diff line change @@ -62,6 +62,9 @@ ENV RELATIVE_PATH=${RELATIVE_PATH}
62
62
# Specify the repo
63
63
ENV REPO=${REPO}
64
64
65
+ # Specify home domain
66
+ ENV HOME_DOMAIN=${HOME_DOMAIN}
67
+
65
68
# Copy entrypoint script
66
69
COPY /entrypoint.sh /usr/local/bin/
67
70
Original file line number Diff line number Diff line change @@ -63,15 +63,18 @@ if [ $? -ne 0 ]; then
63
63
exit 1
64
64
fi
65
65
66
+ # If the HOME_DOMAIN is set, set it to home_domain=HOME_DOMAIN, otherwise set it to an empty string
67
+ HOME_DOMAIN=${HOME_DOMAIN: +" --meta home_domain=$HOME_DOMAIN " }
68
+
66
69
# Check if the PACKAGE is defined add it to the build command
67
70
if [ " $PACKAGE " ]; then
68
- stellar contract build --package $PACKAGE --out-dir ${OUTPUT} --meta source_repo=$REPO
71
+ stellar contract build --package $PACKAGE --out-dir ${OUTPUT} --meta source_repo=$REPO $HOME_DOMAIN
69
72
# Set the package name to the provided package name
70
73
PACKAGE_NAME=$PACKAGE
71
74
else
72
75
# Get the package name from the Cargo.toml file
73
76
PACKAGE_NAME=$( grep -m1 ' ^name =' Cargo.toml | cut -d ' "' -f2)
74
- stellar contract build --out-dir ${OUTPUT} --meta source_repo=$REPO
77
+ stellar contract build --out-dir ${OUTPUT} --meta source_repo=$REPO $HOME_DOMAIN
75
78
fi
76
79
77
80
# Verify that the build was successful
You can’t perform that action at this time.
0 commit comments