-
Notifications
You must be signed in to change notification settings - Fork 85
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #516 from 0xPolygonID/develop
Release 2.3.0
- Loading branch information
Showing
216 changed files
with
7,661 additions
and
3,711 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
17 changes: 6 additions & 11 deletions
17
.github/workflows/dockerhub.yml → .github/workflows/dockerhub-dev.yml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,63 @@ | ||
name: Build a Push Latest Docker Image to Docker Hub | ||
|
||
on: | ||
workflow_run: | ||
workflows: ["Checks"] | ||
branches: ["main"] | ||
types: | ||
- completed | ||
|
||
jobs: | ||
docker: | ||
name: Build and deploy latest image Docker Hub | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v3 | ||
|
||
- name: Set up QEMU | ||
uses: docker/setup-qemu-action@v2 | ||
|
||
- name: Set up Docker Buildx | ||
uses: docker/setup-buildx-action@v2 | ||
|
||
- name: Login to Docker Hub | ||
uses: docker/login-action@v2 | ||
with: | ||
username: ${{ secrets.DOCKERHUB_USERNAME }} | ||
password: ${{ secrets.DOCKERHUB_PASSWORD }} | ||
|
||
- name: Build and push ui | ||
uses: docker/build-push-action@v4 | ||
env: | ||
IMAGE_TAG: latest | ||
with: | ||
context: ./ui | ||
platforms: linux/arm64, linux/amd64 | ||
push: true | ||
tags: 0xpolygon/issuernode-ui:${{ env.IMAGE_TAG }} | ||
|
||
- name: Build and push amd64 image | ||
uses: docker/build-push-action@v4 | ||
env: | ||
IMAGE_TAG: latest | ||
with: | ||
context: . | ||
platforms: linux/amd64 | ||
push: true | ||
tags: 0xpolygon/issuernode:${{ env.IMAGE_TAG }} | ||
|
||
- name: Rename Docker Arm File | ||
run: | | ||
mv Dockerfile Dockerfile-amd | ||
mv Dockerfile-arm Dockerfile | ||
- name: Build and push arm64 image | ||
uses: docker/build-push-action@v4 | ||
env: | ||
IMAGE_TAG: latest | ||
with: | ||
context: . | ||
platforms: linux/arm64 | ||
push: true | ||
tags: 0xpolygon/issuernode-arm:${{ env.IMAGE_TAG }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -13,6 +13,7 @@ RUN go install -buildvcs=false -ldflags "-X main.build=${VERSION}" ./cmd/... | |
|
||
FROM alpine:latest | ||
RUN apk add --no-cache libstdc++ gcompat libgomp | ||
RUN apk add --update busybox>1.3.1-r0 | ||
RUN ln -sfv ld-linux-x86-64.so.2 /lib/libresolv.so.2 | ||
|
||
RUN apk add doas; \ | ||
|
@@ -23,6 +24,4 @@ RUN chmod g+rx,o+rx / | |
COPY --from=base ./service/api ./api | ||
COPY --from=base ./service/api_ui ./api_ui | ||
COPY --from=base ./service/bin/* ./ | ||
COPY --from=base ./service/pkg/credentials ./pkg/credentials | ||
COPY --from=base "/go/pkg/mod/github.com/iden3/[email protected]/wasmer/packaged/" \ | ||
"/go/pkg/mod/github.com/iden3/[email protected]/wasmer/packaged/" | ||
COPY --from=base ./service/pkg/credentials ./pkg/credentials |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,4 @@ | ||
FROM ubuntu:22.04 as base | ||
|
||
FROM golang:1.20.5 as base | ||
ARG VERSION | ||
WORKDIR /service | ||
ENV GOBIN /service/bin | ||
|
@@ -10,36 +9,19 @@ COPY ./internal ./internal | |
COPY ./pkg ./pkg | ||
COPY ./go.mod ./ | ||
COPY ./go.sum ./ | ||
|
||
RUN apt-get update | ||
RUN apt-get install -y wget build-essential ca-certificates | ||
RUN wget https://go.dev/dl/go1.20.5.linux-arm64.tar.gz | ||
|
||
ENV GOROOT /usr/local/go | ||
ENV GOPATH /go | ||
ENV PATH /usr/local/go/bin:/go/bin:$PATH | ||
ENV GOBIN /service/bin | ||
|
||
RUN tar -xvf go1.20.5.linux-arm64.tar.gz | ||
RUN mv go /usr/local | ||
|
||
RUN go mod download | ||
RUN go install -buildvcs=false -ldflags "-X main.build=${VERSION}" ./cmd/... | ||
|
||
|
||
FROM alpine:latest | ||
RUN apk add --no-cache libstdc++ gcompat libgomp | ||
RUN apk add --update busybox>1.3.1-r0 | ||
RUN ln -sfv ld-linux-x86-64.so.2 /lib/libresolv.so.2 | ||
|
||
RUN apk add doas; \ | ||
adduser -S issuer -D -G wheel; \ | ||
echo 'permit nopass :wheel as root' >> /etc/doas.d/doas.conf; | ||
RUN chmod g+rx,o+rx / | ||
|
||
|
||
COPY --from=base ./service/api ./api | ||
COPY --from=base ./service/api_ui ./api_ui | ||
COPY --from=base ./service/bin/* ./ | ||
COPY --from=base ./service/pkg/credentials ./pkg/credentials | ||
COPY --from=base "/go/pkg/mod/github.com/iden3/[email protected]/wasmer/packaged/" \ | ||
"/go/pkg/mod/github.com/iden3/[email protected]/wasmer/packaged/" | ||
COPY --from=base ./service/pkg/credentials ./pkg/credentials |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.