Skip to content

Commit

Permalink
added workflows for all components
Browse files Browse the repository at this point in the history
  • Loading branch information
kkmanos committed May 13, 2024
1 parent 4644685 commit 66369f2
Show file tree
Hide file tree
Showing 13 changed files with 144 additions and 17 deletions.
8 changes: 3 additions & 5 deletions .github/workflows/docker-build-push.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,17 +14,15 @@ on:
dockerfile-path:
type: string
required: true
# secrets:
# GITHUB_TOKEN:
# required: false

jobs:
build:
runs-on: ubuntu-latest

steps:
- name: Check actor
shell: bash
run: |
echo "Actor: ${{ github.actor }}" && echo "Actor: ${{ secrets.GITHUB_TOKEN }}"
- uses: actions/checkout@v3
- name: 'Login to GitHub Container Registry'
uses: docker/login-action@v2
Expand Down
21 changes: 21 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,21 @@
name: Build Docker image
on:
push:
branches-ignore:
- dc4eu-rome
- master
pull_request:

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

uses: ./.github/workflows/docker-build-push.yml
# secrets:
# GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
image-tag: ghcr.io/gunet/wallet-enterprise-acme-verifier:latest
docker-push: false
dockerfile-path: ./wallet-enterprise-configurations/acme-verifier/Dockerfile
21 changes: 21 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,21 @@
name: Build Docker image
on:
push:
branches-ignore:
- dc4eu-rome
- master
pull_request:

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

uses: ./.github/workflows/docker-build-push.yml
# secrets:
# GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
image-tag: ghcr.io/gunet/wallet-enterprise-ehic-issuer:latest
docker-push: false
dockerfile-path: ./wallet-enterprise-configurations/ehic-issuer/Dockerfile
21 changes: 21 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,21 @@
name: Build Docker image
on:
push:
branches-ignore:
- dc4eu-rome
- master
pull_request:

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

uses: ./.github/workflows/docker-build-push.yml
# secrets:
# GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
image-tag: ghcr.io/gunet/wallet-enterprise-pda1-issuer:latest
docker-push: false
dockerfile-path: ./wallet-enterprise-configurations/pda1-issuer/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ on:
push:
branches-ignore:
- dc4eu-rome
- master
pull_request:

jobs:
Expand All @@ -11,8 +12,10 @@ jobs:
contents: read
packages: read

uses: gunet/wallet-ecosystem/.github/workflows/docker-build-push.yml@dc-workflow
uses: ./.github/workflows/docker-build-push.yml
# secrets:
# GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
image-tag: ghcr.io/gunet/wallet-enterprise-vid-issuer:latest
docker-push: false
dockerfile-path: ./wallet-enterprise-configurations/vid-issuer/Dockerfile
dockerfile-path: ./wallet-enterprise-configurations/vid-issuer/Dockerfile
21 changes: 21 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,21 @@
name: Build Docker image
on:
push:
branches-ignore:
- dc4eu-rome
- master
pull_request:

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

uses: ./.github/workflows/docker-build-push.yml
# secrets:
# GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
image-tag: ghcr.io/gunet/wallet-enterprise-acme-verifier:latest
docker-push: true
dockerfile-path: ./wallet-enterprise-configurations/acme-verifier/Dockerfile
21 changes: 21 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,21 @@
name: Build Docker image
on:
push:
branches-ignore:
- dc4eu-rome
- master
pull_request:

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

uses: ./.github/workflows/docker-build-push.yml
# secrets:
# GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
image-tag: ghcr.io/gunet/wallet-enterprise-ehic-issuer:latest
docker-push: true
dockerfile-path: ./wallet-enterprise-configurations/ehic-issuer/Dockerfile
21 changes: 21 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,21 @@
name: Build Docker image
on:
push:
branches-ignore:
- dc4eu-rome
- master
pull_request:

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

uses: ./.github/workflows/docker-build-push.yml
# secrets:
# GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
image-tag: ghcr.io/gunet/wallet-enterprise-pda1-issuer:latest
docker-push: true
dockerfile-path: ./wallet-enterprise-configurations/pda1-issuer/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ on:
push:
branches-ignore:
- dc4eu-rome
- master
pull_request:

jobs:
Expand All @@ -11,8 +12,10 @@ jobs:
contents: read
packages: read

uses: gunet/wallet-ecosystem/.github/workflows/docker-build-push.yml@dc-workflow
uses: ./.github/workflows/docker-build-push.yml
# secrets:
# GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
image-tag: ghcr.io/gunet/wallet-enterprise-vid-issuer:latest
docker-push: true
dockerfile-path: ./wallet-enterprise-configurations/vid-issuer/Dockerfile
dockerfile-path: ./wallet-enterprise-configurations/vid-issuer/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -14,20 +14,22 @@ COPY ./wallet-enterprise-configurations/acme-verifier/views/verifier/success.pug
COPY ./wallet-enterprise-configurations/acme-verifier/public/styles/styles.css /app/public/styles/styles.css
COPY ./wallet-enterprise-configurations/acme-verifier/public/images /app/public/images

RUN yarn cache clean && yarn install && yarn build
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/.npmrc .
COPY --from=builder /app/dist ./dist
COPY --from=builder /app/public ./public
COPY --from=builder /app/views/ ./views/


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


ENV NODE_ENV production
EXPOSE 8003
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@ FROM node:16-bullseye-slim AS production
WORKDIR /app

COPY --from=builder /app/package.json .
COPY --from=builder /app/.npmrc .
COPY --from=builder /app/dist/ ./dist/
COPY --from=builder /app/public/ ./public/
COPY --from=builder /app/views/ ./views/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@ FROM node:16-bullseye-slim AS production
WORKDIR /app

COPY --from=builder /app/package.json .
COPY --from=builder /app/.npmrc .
COPY --from=builder /app/dist/ ./dist/
COPY --from=builder /app/public/ ./public/
COPY --from=builder /app/views/ ./views/
Expand Down
3 changes: 0 additions & 3 deletions wallet-enterprise-configurations/vid-issuer/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,6 @@
FROM node:16-bullseye-slim AS builder
WORKDIR /app



COPY wallet-enterprise/ .
RUN rm -rf src/configuration/
COPY ./wallet-enterprise-configurations/vid-issuer/src/configuration/ src/configuration/
Expand All @@ -20,7 +18,6 @@ FROM node:16-bullseye-slim AS production
WORKDIR /app

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

0 comments on commit 66369f2

Please sign in to comment.