Skip to content

Commit

Permalink
fix(ci): web3 & web3-indexer docker build
Browse files Browse the repository at this point in the history
  • Loading branch information
jjyr committed Jan 30, 2023
1 parent c2be27a commit 1a31745
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 8 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/web3-docker-publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ jobs:
if: ${{ github.ref_type != 'tag' }}
uses: docker/build-push-action@v2
with:
context: ./web3
file: ./web3/Dockerfile
push: ${{ github.event_name != 'pull_request' }}
tags: ${{ steps.meta.outputs.tags }}-${{ steps.commit.outputs.sha_short }}
labels: ${{ steps.meta.outputs.labels }}
Expand All @@ -79,7 +79,7 @@ jobs:
if: ${{ startsWith(github.ref, 'refs/tags') }}
uses: docker/build-push-action@v2
with:
context: ./web3
file: ./web3/Dockerfile
push: ${{ github.event_name != 'pull_request' }}
tags: ${{ steps.split.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
2 changes: 0 additions & 2 deletions .github/workflows/web3-indexer-docker-publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,6 @@ jobs:
uses: docker/build-push-action@v2
with:
file: web3/docker/indexer/Dockerfile
context: ./web3
push: ${{ github.event_name != 'pull_request' }}
tags: ${{ steps.meta.outputs.tags }}-${{ steps.commit.outputs.sha_short }}
labels: ${{ steps.meta.outputs.labels }}
Expand All @@ -81,7 +80,6 @@ jobs:
uses: docker/build-push-action@v2
with:
file: web3/docker/indexer/Dockerfile
context: ./web3
push: ${{ github.event_name != 'pull_request' }}
tags: ${{ steps.split.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
Expand Down
7 changes: 5 additions & 2 deletions web3/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,8 +1,11 @@

FROM node:14-bullseye

COPY . /godwoken-web3/.
RUN cd /godwoken-web3 && yarn && yarn build
COPY . /godwoken/.

WORKDIR /godwoken/web3

RUN yarn && yarn build

RUN npm install pm2 -g

Expand Down
5 changes: 3 additions & 2 deletions web3/docker/indexer/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,9 @@ FROM rust:1-bullseye as builder
RUN apt-get update
RUN apt-get -y install --no-install-recommends llvm-dev clang libclang-dev libssl-dev

COPY . /godwoken-web3
RUN cd /godwoken-web3 && rustup component add rustfmt && cargo build --release
COPY . /godwoken
WORKDIR /godwoken/web3
RUN rustup component add rustfmt && cargo build --release

FROM ubuntu:focal

Expand Down

0 comments on commit 1a31745

Please sign in to comment.