Skip to content

Commit

Permalink
To test webapp deployment
Browse files Browse the repository at this point in the history
  • Loading branch information
richaarora01 committed Mar 21, 2024
1 parent 051e65b commit 8139f92
Show file tree
Hide file tree
Showing 2 changed files with 71 additions and 0 deletions.
36 changes: 36 additions & 0 deletions .github/workflows/rsbh-dh-web-form-cd.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
name: rsbc-dh-web-form-cd

on:
push:
# types: [opened, reopened, edited, synchronize]
branches:
- 'release/test-workflow'
paths:
- "web_app/README.md"
- "web_app/**"
- ".github/workflows/rsbh-dh-web-form*.yml"

env:
DOCKER_FILE: web_app/Dockerfile
DOCKER_IMAGE_NAME: dh-web-form
WORKING_DIRECTORY: web_app

jobs:
build:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v2

- name: Login
uses: docker/login-action@v2
with:
registry: ${{ secrets.DOCKER_REGISTRY }}
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_PASSWORD }}

- name: Build & Push the image
working-directory: ${{env.WORKING_DIRECTORY}}
run: |
docker build -t ${{ secrets.DOCKER_REGISTRY }}/${{ env.DOCKER_IMAGE_NAME }}:latest .
docker push ${{ secrets.DOCKER_REGISTRY }}/${{ env.DOCKER_IMAGE_NAME }}:latest
35 changes: 35 additions & 0 deletions .github/workflows/rsbh-dh-web-form-ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
name: rsbc-dh-web-form-ci

on:
pull_request:
types: [opened, reopened, edited, synchronize]
branches-ignore:
- master
paths:
- "web_app/README.md"
- "web_app/**"
- ".github/workflows/rsbh-dh-web-form*.yml"

env:
DOCKER_FILE: web_app/Dockerfile
DOCKER_IMAGE_NAME: dh-web-form
WORKING_DIRECTORY: web_app

jobs:
build:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v2

- name: Login
uses: docker/login-action@v2
with:
registry: ${{ secrets.DOCKER_REGISTRY }}
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_PASSWORD }}

- name: Build & Push the image
working-directory: ${{env.WORKING_DIRECTORY}}
run: |
docker build -t ${{ secrets.DOCKER_REGISTRY }}/${{ env.DOCKER_IMAGE_NAME }}:latest .

0 comments on commit 8139f92

Please sign in to comment.