Skip to content

Commit

Permalink
Merge pull request #24 from gunet/gunet-workflows
Browse files Browse the repository at this point in the history
Gunet workflows
  • Loading branch information
kkmanos authored Jun 3, 2024
2 parents 1643c7e + ebcc320 commit d4da529
Show file tree
Hide file tree
Showing 18 changed files with 329 additions and 6 deletions.
8 changes: 6 additions & 2 deletions .github/workflows/docker-build-push.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,10 @@ on:
type: boolean
required: true

dockerfile-path:
type: string
required: true

jobs:
build:
runs-on: ubuntu-latest
Expand All @@ -25,14 +29,14 @@ jobs:
password: ${{secrets.GITHUB_TOKEN}}

- name: Set up .npmrc to access GitHub NPM registry
uses: wwwallet/wallet-ecosystem/.github/actions/setup-npmrc@master
uses: gunet/wallet-ecosystem/.github/actions/setup-npmrc@dc4eu-rome
with:
token: ${{ secrets.GITHUB_TOKEN }}

- uses: docker/build-push-action@v3
with:
context: .
file: ./Dockerfile
file: ${{ inputs.dockerfile-path }}
push: ${{ inputs.docker-push }}
tags: ${{ inputs.image-tag }}
secret-files: |
Expand Down
20 changes: 20 additions & 0 deletions .github/workflows/docker-image-wallet-enterprise-acme-verifier.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
name: Build Docker image
on:
push:
branches-ignore:
- master
- dc4eu-rome
pull_request:

jobs:
build-acme:
permissions:
contents: read
packages: read

uses: ./.github/workflows/docker-build-push.yml
secrets: inherit
with:
image-tag: ghcr.io/gunet/wallet-enterprise-acme-verifier:latest
docker-push: false
dockerfile-path: ./wallet-enterprise-configurations/acme-verifier/Dockerfile
20 changes: 20 additions & 0 deletions .github/workflows/docker-image-wallet-enterprise-ehic-issuer.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
name: Build Docker image
on:
push:
branches-ignore:
- master
- dc4eu-rome
pull_request:

jobs:
build-ehic:
permissions:
contents: read
packages: read

uses: ./.github/workflows/docker-build-push.yml
secrets: inherit
with:
image-tag: ghcr.io/gunet/wallet-enterprise-ehic-issuer:latest
docker-push: false
dockerfile-path: ./wallet-enterprise-configurations/ehic-issuer/Dockerfile
20 changes: 20 additions & 0 deletions .github/workflows/docker-image-wallet-enterprise-pda1-issuer.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
name: Build Docker image
on:
push:
branches-ignore:
- master
- dc4eu-rome
pull_request:

jobs:
build-pda1:
permissions:
contents: read
packages: read

uses: ./.github/workflows/docker-build-push.yml
secrets: inherit
with:
image-tag: ghcr.io/gunet/wallet-enterprise-pda1-issuer:latest
docker-push: false
dockerfile-path: ./wallet-enterprise-configurations/pda1-issuer/Dockerfile
20 changes: 20 additions & 0 deletions .github/workflows/docker-image-wallet-enterprise-vid-issuer.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
name: Build Docker image
on:
push:
branches-ignore:
- master
- dc4eu-rome
pull_request:

jobs:
build-vid:
permissions:
contents: read
packages: read

uses: ./.github/workflows/docker-build-push.yml
secrets: inherit
with:
image-tag: ghcr.io/gunet/wallet-enterprise-vid-issuer:latest
docker-push: false
dockerfile-path: ./wallet-enterprise-configurations/vid-issuer/Dockerfile
20 changes: 20 additions & 0 deletions .github/workflows/docker-push-wallet-enterprise-acme-verifier.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
name: Push Docker image
on:
push:
tags:
- v0.*
- v1.*
- v2.*

jobs:
push-acme:
permissions:
contents: read
packages: write

uses: ./.github/workflows/docker-build-push.yml
secrets: inherit
with:
image-tag: ghcr.io/gunet/wallet-enterprise-acme-verifier:${{ github.ref_name }}
docker-push: true
dockerfile-path: ./wallet-enterprise-configurations/acme-verifier/Dockerfile
20 changes: 20 additions & 0 deletions .github/workflows/docker-push-wallet-enterprise-ehic-issuer.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
name: Push Docker image
on:
push:
tags:
- v0.*
- v1.*
- v2.*

jobs:
push-ehic:
permissions:
contents: read
packages: write

uses: ./.github/workflows/docker-build-push.yml
secrets: inherit
with:
image-tag: ghcr.io/gunet/wallet-enterprise-ehic-issuer:${{ github.ref_name }}
docker-push: true
dockerfile-path: ./wallet-enterprise-configurations/ehic-issuer/Dockerfile
20 changes: 20 additions & 0 deletions .github/workflows/docker-push-wallet-enterprise-pda1-issuer.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
name: Push Docker image
on:
push:
tags:
- v0.*
- v1.*
- v2.*

jobs:
push-pda1:
permissions:
contents: read
packages: write

uses: ./.github/workflows/docker-build-push.yml
secrets: inherit
with:
image-tag: ghcr.io/gunet/wallet-enterprise-pda1-issuer:${{ github.ref_name }}
docker-push: true
dockerfile-path: ./wallet-enterprise-configurations/pda1-issuer/Dockerfile
20 changes: 20 additions & 0 deletions .github/workflows/docker-push-wallet-enterprise-vid-issuer.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
name: Push Docker image
on:
push:
tags:
- v0.*
- v1.*
- v2.*

jobs:
push-vid:
permissions:
contents: read
packages: write

uses: ./.github/workflows/docker-build-push.yml
secrets: inherit
with:
image-tag: ghcr.io/gunet/wallet-enterprise-vid-issuer:${{ github.ref_name }}
docker-push: true
dockerfile-path: ./wallet-enterprise-configurations/vid-issuer/Dockerfile
2 changes: 1 addition & 1 deletion resources-vault
2 changes: 1 addition & 1 deletion wallet-backend-server
37 changes: 37 additions & 0 deletions wallet-enterprise-configurations/acme-verifier/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
# Builder stage
FROM ghcr.io/gunet/wallet-enterprise:base AS builder
WORKDIR /app


RUN rm -rf /app/src/configuration/

COPY ./wallet-enterprise-configurations/acme-verifier/src/configuration src/configuration
COPY ./wallet-enterprise-configurations/acme-verifier/public/styles/styles.css public/styles/styles.css
COPY ./wallet-enterprise-configurations/acme-verifier/views/index.pug views/index.pug
COPY ./wallet-enterprise-configurations/acme-verifier/views/header.pug views/header.pug
COPY ./wallet-enterprise-configurations/acme-verifier/views/verifier/public_definitions.pug views/verifier/public_definitions.pug
COPY ./wallet-enterprise-configurations/acme-verifier/views/verifier/QR.pug views/verifier/QR.pug
COPY ./wallet-enterprise-configurations/acme-verifier/views/verifier/success.pug views/verifier/success.pug
COPY ./wallet-enterprise-configurations/acme-verifier/public/images public/images

RUN --mount=type=secret,id=npmrc,required=true,target=./.npmrc,uid=1000 \
yarn cache clean && yarn install && yarn build

# Production stage
FROM node:16-bullseye-slim AS production
WORKDIR /app

COPY --from=builder /app/package.json .
COPY --from=builder /app/dist ./dist
COPY --from=builder /app/public ./public
COPY --from=builder /app/views/ ./views/


RUN --mount=type=secret,id=npmrc,required=true,target=./.npmrc,uid=1000 \
yarn cache clean && yarn install --production


ENV NODE_ENV production
EXPOSE 8003

CMD ["node", "./dist/src/app.js"]
32 changes: 32 additions & 0 deletions wallet-enterprise-configurations/diploma-issuer/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
# Builder stage
FROM ghcr.io/gunet/wallet-enterprise:base AS builder
WORKDIR /app

COPY wallet-enterprise/ .
RUN rm -rf src/configuration/
COPY ./wallet-enterprise-configurations/diploma-issuer/src/configuration /app/src/configuration
COPY ./wallet-enterprise-configurations/diploma-issuer/views/issuer/login.pug /app/views/issuer/login.pug
COPY ./wallet-enterprise-configurations/diploma-issuer/public/styles/styles.css /app/public/styles/styles.css
COPY ./wallet-enterprise-configurations/diploma-issuer/public/images /app/public/images
COPY ./wallet-enterprise-configurations/diploma-issuer/views/header.pug /app/views/header.pug
COPY ./wallet-enterprise-configurations/diploma-issuer/views/index.pug /app/views/index.pug

RUN --mount=type=secret,id=npmrc,required=true,target=./.npmrc,uid=1000 \
yarn cache clean && yarn install && yarn build

# Production stage
FROM node:16-bullseye-slim AS production
WORKDIR /app

COPY --from=builder /app/package.json .
COPY --from=builder /app/dist/ ./dist/
COPY --from=builder /app/public/ ./public/
COPY --from=builder /app/views/ ./views/

RUN --mount=type=secret,id=npmrc,required=true,target=./.npmrc,uid=1000 \
yarn cache clean && yarn install --production

ENV NODE_ENV production
EXPOSE 8003

CMD ["node", "./dist/src/app.js"]
30 changes: 30 additions & 0 deletions wallet-enterprise-configurations/ehic-issuer/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
# Builder stage
FROM ghcr.io/gunet/wallet-enterprise:base AS builder
WORKDIR /app

RUN rm -rf src/configuration/
COPY ./wallet-enterprise-configurations/ehic-issuer/public/styles/styles.css public/styles/styles.css
COPY ./wallet-enterprise-configurations/ehic-issuer/src/configuration src/configuration
COPY ./wallet-enterprise-configurations/ehic-issuer/views/header.pug views/header.pug
COPY ./wallet-enterprise-configurations/ehic-issuer/views/index.pug views/index.pug

RUN --mount=type=secret,id=npmrc,required=true,target=./.npmrc,uid=1000 \
yarn cache clean && yarn install && yarn build

# Production stage
FROM node:16-bullseye-slim AS production
WORKDIR /app

COPY --from=builder /app/package.json .
COPY --from=builder /app/dist/ ./dist/
COPY --from=builder /app/public/ ./public/
COPY --from=builder /app/views/ ./views/


RUN --mount=type=secret,id=npmrc,required=true,target=./.npmrc,uid=1000 \
yarn cache clean && yarn install --production

ENV NODE_ENV production
EXPOSE 8003

CMD ["node", "./dist/src/app.js"]
30 changes: 30 additions & 0 deletions wallet-enterprise-configurations/pda1-issuer/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
# Builder stage
FROM ghcr.io/gunet/wallet-enterprise:base AS builder
WORKDIR /app

RUN rm -rf src/configuration/
COPY ./wallet-enterprise-configurations/pda1-issuer/src/configuration src/configuration
COPY ./wallet-enterprise-configurations/pda1-issuer/views/header.pug views/header.pug
COPY ./wallet-enterprise-configurations/pda1-issuer/public/styles/styles.css public/styles/styles.css
COPY ./wallet-enterprise-configurations/pda1-issuer/views/index.pug views/index.pug


RUN --mount=type=secret,id=npmrc,required=true,target=./.npmrc,uid=1000 \
yarn cache clean && yarn install && yarn build

# Production stage
FROM node:16-bullseye-slim AS production
WORKDIR /app

COPY --from=builder /app/package.json .
COPY --from=builder /app/dist/ ./dist/
COPY --from=builder /app/public/ ./public/
COPY --from=builder /app/views/ ./views/

RUN --mount=type=secret,id=npmrc,required=true,target=./.npmrc,uid=1000 \
yarn cache clean && yarn install --production

ENV NODE_ENV production
EXPOSE 8003

CMD ["node", "./dist/src/app.js"]
30 changes: 30 additions & 0 deletions wallet-enterprise-configurations/vid-issuer/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
# Builder stage
FROM ghcr.io/gunet/wallet-enterprise:base AS builder
WORKDIR /app

RUN rm -rf src/configuration/
COPY ./wallet-enterprise-configurations/vid-issuer/src/configuration src/configuration:rw
COPY ./wallet-enterprise-configurations/vid-issuer/public/styles/styles.css public/styles/styles.css
COPY ./wallet-enterprise-configurations/vid-issuer/public/images public/images
COPY ./wallet-enterprise-configurations/vid-issuer/views/header.pug views/header.pug
COPY ./wallet-enterprise-configurations/vid-issuer/views/index.pug views/index.pug

RUN --mount=type=secret,id=npmrc,required=true,target=./.npmrc,uid=1000 \
yarn cache clean && yarn install && yarn build

# Production stage
FROM node:16-bullseye-slim AS production
WORKDIR /app

COPY --from=builder /app/package.json .
COPY --from=builder /app/dist/ ./dist/
COPY --from=builder /app/public/ ./public/
COPY --from=builder /app/views/ ./views/

RUN --mount=type=secret,id=npmrc,required=true,target=./.npmrc,uid=1000 \
yarn cache clean && yarn install --production

ENV NODE_ENV production
EXPOSE 8003

CMD ["node", "./dist/src/app.js"]
2 changes: 1 addition & 1 deletion wallet-frontend
Submodule wallet-frontend updated 54 files
+15 −15 .env.template
+19 −0 .github/workflows/docker-build.yml
+20 −0 .github/workflows/docker-push.yml
+3 −1 .gitignore
+19 −3 Dockerfile
+4 −0 README.md
+2 −2 development.Dockerfile
+10 −5 package.json
+31 −14 public/index.html
+9 −2 public/robots.txt
+9 −0 public/sitemap.xml
+2 −0 setup-vitest.ts
+30 −29 src/App.js
+0 −8 src/App.test.js
+23 −8 src/api/index.ts
+15 −11 src/components/BottomNav.js
+18 −18 src/components/BrowserSupport.tsx
+40 −0 src/components/Buttons/GetButton.js
+13 −21 src/components/Buttons/QRButton.js
+10 −6 src/components/Credentials/CredentialDeleteButton.js
+13 −13 src/components/Credentials/CredentialInfo.js
+17 −13 src/components/Credentials/CredentialJson.js
+13 −35 src/components/HandlerNotification.js
+15 −13 src/components/Layout.js
+39 −32 src/components/Popups/DeletePopup.js
+15 −15 src/components/Popups/FullscreenImg.js
+18 −17 src/components/Popups/MessagePopup.js
+55 −51 src/components/Popups/PinInput.js
+43 −29 src/components/Popups/RedirectPopup.js
+206 −82 src/components/Popups/SelectCredentials.js
+21 −17 src/components/QRCodeScanner/QRCodeScanner.js
+1 −1 src/components/SeparatorLine.js
+42 −37 src/components/Sidebar.js
+13 −5 src/components/Spinner.js
+49 −0 src/components/WelcomeTourGuide/WecomeModal.js
+136 −0 src/components/WelcomeTourGuide/WelcomeTourGuide.js
+45 −0 src/context/CredentialsContext.js
+47 −0 src/index.css
+52 −7 src/locales/en.json
+11 −11 src/pages/AddCredentials/AddCredentials.js
+93 −59 src/pages/History/History.js
+12 −11 src/pages/Home/CredentialDetail.js
+65 −49 src/pages/Home/Home.js
+239 −206 src/pages/Login/Login.js
+6 −5 src/pages/NotFound/NotFound.js
+10 −10 src/pages/SendCredentials/SendCredentials.js
+139 −147 src/pages/Settings/Settings.tsx
+48 −587 src/services/LocalStorageKeystore.ts
+135 −0 src/services/keystore.test.ts
+612 −0 src/services/keystore.ts
+6 −5 tailwind.config.js
+14 −0 var_replacement.sh
+7 −0 vitest.config.ts
+835 −14 yarn.lock

0 comments on commit d4da529

Please sign in to comment.