Skip to content

Commit

Permalink
Merge branch 'cosmos/v0.44.x' of https://github.com/forbole/bdjuno in…
Browse files Browse the repository at this point in the history
…to cosmos/v0.46.x
  • Loading branch information
MonikaCat committed Feb 17, 2023
2 parents e1b5ef4 + 8573e2f commit 83a54c6
Show file tree
Hide file tree
Showing 5 changed files with 45 additions and 39 deletions.
13 changes: 11 additions & 2 deletions .github/workflows/docker-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,19 +33,28 @@ jobs:
echo ::set-output name=version::${VERSION}
echo ::set-output name=tags::${TAGS}
echo ::set-output name=created::$(date -u +'%Y-%m-%dT%H:%M:%SZ')
- name: Determine Dockerfile to use
run: |
if [[ -f Dockerfile.cosmwasm ]]; then
export DOCKERFILE=Dockerfile.cosmwasm
else
export DOCKERFILE=Dockerfile.default
fi
echo "DOCKERFILE=${DOCKERFILE}" >> $GITHUB_ENV
-
name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2
-
name: Login to DockerHub
uses: docker/login-action@v2
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_PASSWORD }}
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_PASSWORD }}
-
name: Build and push
uses: docker/build-push-action@v4
with:
context: .
file: "./${{ env.DOCKERFILE }}"
push: true
tags: ${{ steps.prep.outputs.tags }}
2 changes: 1 addition & 1 deletion .github/workflows/lint-pr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,6 @@ jobs:
main:
runs-on: ubuntu-latest
steps:
- uses: amannn/action-semantic-pull-request@v5.0.2
- uses: amannn/action-semantic-pull-request@v5.1.0
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
36 changes: 0 additions & 36 deletions Dockerfile

This file was deleted.

22 changes: 22 additions & 0 deletions Dockerfile.cosmwasm
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@


FROM golang:1.18-alpine AS builder
RUN apk update && apk add --no-cache make git
WORKDIR /go/src/github.com/forbole/bdjuno
COPY . ./

RUN apk update && apk add --no-cache ca-certificates build-base git
ADD https://github.com/CosmWasm/wasmvm/releases/download/v1.1.1/libwasmvm_muslc.aarch64.a /lib/libwasmvm_muslc.aarch64.a
ADD https://github.com/CosmWasm/wasmvm/releases/download/v1.1.1/libwasmvm_muslc.x86_64.a /lib/libwasmvm_muslc.x86_64.a
RUN sha256sum /lib/libwasmvm_muslc.aarch64.a | grep 9ecb037336bd56076573dc18c26631a9d2099a7f2b40dc04b6cae31ffb4c8f9a
RUN sha256sum /lib/libwasmvm_muslc.x86_64.a | grep 6e4de7ba9bad4ae9679c7f9ecf7e283dd0160e71567c6a7be6ae47c81ebe7f32
## Copy the library you want to the final location that will be found by the linker flag `-lwasmvm_muslc`
RUN cp /lib/libwasmvm_muslc.$(uname -m).a /lib/libwasmvm_muslc.a
RUN go mod download
RUN LINK_STATICALLY=true BUILD_TAGS="muslc" make build

FROM alpine:latest
RUN apk update && apk add --no-cache ca-certificates build-base
WORKDIR /bdjuno
COPY --from=builder /go/src/github.com/forbole/bdjuno/build/bdjuno /usr/bin/bdjuno
CMD [ "bdjuno" ]
11 changes: 11 additions & 0 deletions Dockerfile.default
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
FROM golang:1.18-alpine AS builder
RUN apk update && apk add --no-cache make git
WORKDIR /go/src/github.com/forbole/bdjuno
COPY . ./
RUN go mod download
RUN make build

FROM alpine:latest
WORKDIR /bdjuno
COPY --from=builder /go/src/github.com/forbole/bdjuno/build/bdjuno /usr/bin/bdjuno
CMD [ "bdjuno" ]

0 comments on commit 83a54c6

Please sign in to comment.