diff --git a/.gitea/workflows/build-bee-dashboard.yaml b/.gitea/workflows/build-bee-dashboard.yaml new file mode 100644 index 0000000..52f5474 --- /dev/null +++ b/.gitea/workflows/build-bee-dashboard.yaml @@ -0,0 +1,42 @@ +name: CI +on: + push: + branches: [ master ] + paths: + - 'bee-dashboard/**' + - '.gitea/workflows/build-bee-dashboard.yaml' +jobs: + "Build bee-dashboard docker images": + runs-on: hostinger + steps: + - + name: Set up Docker Buildx + uses: docker/setup-buildx-action@v3.4.0 + with: + driver: docker-container + platforms: | + linux/amd64 + linux/arm64 + - + name: Login to Gitea container registry + uses: docker/login-action@v3 + with: + registry: gitea.woggioni.net + username: woggioni + password: ${{ secrets.PUBLISHER_TOKEN }} + - + name: Build and push bee-dashboard images + uses: docker/build-push-action@v6 + with: + platforms: | + linux/amd64 + linux/arm64 + context: "{{defaultContext}}:bee-dashboard" + push: true + pull: true + build-args: "VERSION=0.32.0" + tags: | + "gitea.woggioni.net/woggioni/bee-dashboard:0.32.0" + cache-from: type=registry,ref=gitea.woggioni.net/woggioni/bee-dashboard:buildx + cache-to: type=registry,mode=max,compression=zstd,image-manifest=true,oci-mediatypes=true,ref=gitea.woggioni.net/woggioni/bee-dashboard:buildx + diff --git a/bee-dashboard/Dockerfile b/bee-dashboard/Dockerfile new file mode 100644 index 0000000..7cff22f --- /dev/null +++ b/bee-dashboard/Dockerfile @@ -0,0 +1,13 @@ +FROM node:15.14-alpine AS build +ARG VERSION +WORKDIR /src +ADD git@github.com:ethersphere/bee-dashboard.git#v${VERSION} . +RUN npm ci +RUN npm run build + +FROM node:15.14-alpine AS final +RUN npm i -g serve +WORKDIR /app +COPY --from=build /src/build . +EXPOSE 8080 +ENTRYPOINT ["serve", "-l", "8080"]