Skip to content

Commit

Permalink
fix: env var in runtime
Browse files Browse the repository at this point in the history
  • Loading branch information
jim380 committed Jan 30, 2024
1 parent 3d473ff commit b6f0927
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 4 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/interchaintest.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ env:
GITHUB_TOKEN: ${{ secrets.PAT }}
TAR_PATH: /tmp/seda-docker-image.tar
IMAGE_NAME: seda-chaind-e2e
SEDA_EXPONENT: 6
SEDA_EXPONENT: ${{ secrets.SEDA_EXPONENT_ICT || 18 }}

permissions:
contents: read
Expand Down
2 changes: 1 addition & 1 deletion app/params/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ var (
func getSedaExponent() int64 {
sedaExponent := os.Getenv("SEDA_EXPONENT")
if sedaExponent == "" {
return 18 // default value
return 18 // default
}

value, err := strconv.Atoi(sedaExponent)
Expand Down
6 changes: 4 additions & 2 deletions dockerfiles/Dockerfile.e2e
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

ARG GO_VERSION="1.21"
ARG RUNNER_IMAGE="alpine:3.17"
ARG SEDA_EXPONENT="18"

# --------------------------------------------------------
# Builder
Expand Down Expand Up @@ -64,11 +65,12 @@ RUN --mount=type=cache,target=/root/.cache/go-build \

FROM ${RUNNER_IMAGE}

ARG SEDA_EXPONENT

COPY --from=builder /seda-chain/build/seda-chaind /bin/seda-chaind

ARG SEDA_EXPONENT # use default if not set
ENV SEDA_EXPONENT=${SEDA_EXPONENT}
ENV HOME /seda-chain

WORKDIR $HOME

EXPOSE 26656 26657 1317 9090
Expand Down

0 comments on commit b6f0927

Please sign in to comment.