Skip to content

Commit 0491478

Browse files
committed
chore: added github workflow
1 parent 591fc47 commit 0491478

1 file changed

Lines changed: 43 additions & 0 deletions

File tree

.github/workflows/docker-build.yml

Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
name: Build and Push Docker Image
2+
3+
on:
4+
push:
5+
branches:
6+
- z5
7+
workflow_dispatch:
8+
9+
env:
10+
DOCKER_IMAGE: eeacms/reportek-base-dr-instance
11+
DOCKER_TAG: z5
12+
13+
jobs:
14+
build:
15+
name: Build Docker Image
16+
runs-on: ubuntu-latest
17+
steps:
18+
- name: Checkout repository
19+
uses: actions/checkout@v4
20+
21+
- name: Set up Docker Buildx
22+
uses: docker/setup-buildx-action@v3
23+
24+
- name: Login to Docker Hub
25+
uses: docker/login-action@v3
26+
with:
27+
username: ${{ secrets.DOCKERHUB_USERNAME }}
28+
password: ${{ secrets.DOCKERHUB_TOKEN }}
29+
30+
- name: Login to DHI Registry
31+
uses: docker/login-action@v3
32+
with:
33+
registry: dhi.io
34+
username: ${{ secrets.DOCKERHUB_USERNAME }}
35+
password: ${{ secrets.DOCKERHUB_TOKEN }}
36+
37+
- name: Build and push Docker image
38+
uses: docker/build-push-action@v5
39+
with:
40+
context: .
41+
push: true
42+
tags: ${{ env.DOCKER_IMAGE }}:${{ env.DOCKER_TAG }}
43+
no-cache: true

0 commit comments

Comments
 (0)