Skip to content

Commit 9fa0ccb

Browse files
add repo to wasm meta
1 parent 7a50f10 commit 9fa0ccb

File tree

3 files changed

+12
-3
lines changed

3 files changed

+12
-3
lines changed

.github/workflows/release.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ jobs:
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 }}

docker/Dockerfile

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -59,6 +59,9 @@ ENV MAKE_TARGET=${MAKE_TARGET}
5959
# Specify the working directory
6060
ENV RELATIVE_PATH=${RELATIVE_PATH}
6161

62+
# Specify the repo
63+
ENV REPO=${REPO}
64+
6265
# Copy entrypoint script
6366
COPY /entrypoint.sh /usr/local/bin/
6467

docker/entrypoint.sh

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,12 @@ if [ "$MAKE_TARGET" ]; then
2929
fi
3030
fi
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
3339
rustc --version
3440

@@ -59,13 +65,13 @@ fi
5965

6066
# Check if the PACKAGE is defined add it to the build command
6167
if [ "$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
6571
else
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
6975
fi
7076

7177
# Verify that the build was successful

0 commit comments

Comments
 (0)