File tree Expand file tree Collapse file tree 3 files changed +12
-3
lines changed
Expand file tree Collapse file tree 3 files changed +12
-3
lines changed Original file line number Diff line number Diff line change 5858
5959 - name : Run docker container
6060 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 }} -v "${{ env.BUILD_DIR_PATH }}:/inspector/home" ghcr.io/stellar-expert/soroban-build-workflow:v21.5.0
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:v21.5.0
6262
6363 - name : Get compilation info
6464 working-directory : ${{ env.BUILD_DIR_PATH }}
Original file line number Diff line number Diff line change @@ -59,6 +59,9 @@ ENV MAKE_TARGET=${MAKE_TARGET}
5959# Specify the working directory
6060ENV RELATIVE_PATH=${RELATIVE_PATH}
6161
62+ # Specify the repo
63+ ENV REPO=${REPO}
64+
6265# Copy entrypoint script
6366COPY /entrypoint.sh /usr/local/bin/
6467
Original file line number Diff line number Diff line change @@ -29,6 +29,12 @@ if [ "$MAKE_TARGET" ]; then
2929 fi
3030fi
3131
32+ # Check if repo is defined
33+ if [ ! " $REPO " ]; then
34+ echo " ERROR: REPO is not defined"
35+ exit 1
36+ fi
37+
3238# Print Rust version
3339rustc --version
3440
5965
6066# Check if the PACKAGE is defined add it to the build command
6167if [ " $PACKAGE " ]; then
62- stellar contract build --package $PACKAGE --out-dir ${OUTPUT}
68+ stellar contract build --package $PACKAGE --out-dir ${OUTPUT} --meta source_repo= $REPO
6369 # Set the package name to the provided package name
6470 PACKAGE_NAME=$PACKAGE
6571else
6672 # Get the package name from the Cargo.toml file
6773 PACKAGE_NAME=$( grep -m1 ' ^name =' Cargo.toml | cut -d ' "' -f2)
68- stellar contract build --out-dir ${OUTPUT}
74+ stellar contract build --out-dir ${OUTPUT} --meta source_repo= $REPO
6975fi
7076
7177# Verify that the build was successful
You can’t perform that action at this time.
0 commit comments