Skip to content

Commit 8f8c8a9

Browse files
ci(deapp): add gitHub workflows for publishing and testing docker image (#407)
Co-authored-by: abbes benayache <[email protected]>
1 parent 42e7a52 commit 8f8c8a9

File tree

4 files changed

+42
-53
lines changed

4 files changed

+42
-53
lines changed

.github/workflows/dapp-publish.yml

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
name: Publish Docker Image
2+
3+
on:
4+
push:
5+
tags:
6+
- 'protected-data-delivery-dapp-v*'
7+
8+
jobs:
9+
build-test:
10+
uses: iExecBlockchainComputing/github-actions-workflows/.github/workflows/docker-build.yml@fix/docker/types
11+
with:
12+
image-name: 'docker-regis.iex.ec/product/protected-data-delivery-dapp'
13+
image-tag: ${{ github.ref }} # Use the tag of the commit
14+
push: true
15+
dockerfile: 'packages/protected-data-delivery-dapp/Dockerfile'
16+
security-scan: false
17+
hadolint: false
18+
registry: 'docker-regis.iex.ec'
19+
context: 'packages/protected-data-delivery-dapp'
20+
secrets:
21+
username: ${{ secrets.REGIS_USERNAME }}
22+
password: ${{ secrets.REGIS_PASSWORD }}

.github/workflows/dapp-test.yml

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
name: Test Docker Image
2+
3+
on:
4+
pull_request:
5+
branches:
6+
- '*' # Trigger on any pull request
7+
paths:
8+
- 'packages/protected-data-delivery-dapp/**' # Trigger only when changes are made to the dapp
9+
10+
jobs:
11+
build-test:
12+
uses: iExecBlockchainComputing/github-actions-workflows/.github/workflows/docker-build.yml@fix/docker/types
13+
with:
14+
image-name: 'protected-data-delivery-dapp'
15+
image-tag: ${{ github.sha }}
16+
push: false
17+
dockerfile: 'packages/protected-data-delivery-dapp/Dockerfile'
18+
context: 'packages/protected-data-delivery-dapp'

packages/protected-data-delivery-dapp/.drone.yml

Lines changed: 0 additions & 51 deletions
This file was deleted.

packages/protected-data-delivery-dapp/Dockerfile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,8 @@ FROM node:14-alpine3.11 as builder
22

33
WORKDIR /app
44
COPY . .
5-
RUN npm ci
6-
RUN npm run build
5+
RUN npm ci && \
6+
npm run build
77

88
FROM node:14-alpine3.11 as runner
99

0 commit comments

Comments
 (0)