Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
47 changes: 0 additions & 47 deletions .github/workflows/ci.yml

This file was deleted.

46 changes: 46 additions & 0 deletions .github/workflows/develop-deploy.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
name: Develop Deployment

on:
push:
branches:
- develop

jobs:
build-and-push-dev:
runs-on: ubuntu-latest

steps:
- name: Checkout Code
uses: actions/checkout@v4

- name: Setup JDK 17
uses: actions/setup-java@v4
with:
distribution: temurin
java-version: 17

- name: Cache Maven Dependencies
uses: actions/cache@v4
with:
path: ~/.m2
key: ${{ runner.os }}-m2-${{ hashFiles('**/pom.xml') }}

- name: Build Application
run: mvn clean verify

- name: Build Docker Image
run: |
docker build \
-t nayanmoni458/stoneinscription:dev-latest \
-t nayanmoni458/stoneinscription:sha-${GITHUB_SHA::7} .

- name: Login To Docker Hub
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_PASSWORD }}

- name: Push Docker Images
run: |
docker push nayanmoni458/stoneinscription:dev-latest
docker push nayanmoni458/stoneinscription:sha-${GITHUB_SHA::7}
38 changes: 38 additions & 0 deletions .github/workflows/pr-validation.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
name: PR Validation

on:
pull_request:
branches:
- develop
- main

jobs:
validate:
runs-on: ubuntu-latest

steps:
- name: Checkout Code
uses: actions/checkout@v4

- name: Setup JDK 17
uses: actions/setup-java@v4
with:
distribution: temurin
java-version: 17

- name: Cache Maven Dependencies
uses: actions/cache@v4
with:
path: ~/.m2
key: ${{ runner.os }}-m2-${{ hashFiles('**/pom.xml') }}
restore-keys: |
${{ runner.os }}-m2

- name: Compile Project
run: mvn clean compile

# - name: Run Unit Tests
# run: mvn test

- name: Run Verify
run: mvn verify
48 changes: 48 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
name: Release Pipeline

on:
push:
tags:
- 'v*'

jobs:
release:
runs-on: ubuntu-latest

steps:
- name: Checkout Code
uses: actions/checkout@v4

- name: Setup JDK 17
uses: actions/setup-java@v4
with:
distribution: temurin
java-version: 17

- name: Cache Maven Dependencies
uses: actions/cache@v4
with:
path: ~/.m2
key: ${{ runner.os }}-m2-${{ hashFiles('**/pom.xml') }}

- name: Run Full Validation
run: mvn clean verify

- name: Build Docker Image
run: |
docker build \
-t nayanmoni458/stoneinscription:${GITHUB_REF_NAME} \
-t nayanmoni458/stoneinscription:latest \
-t nayanmoni458/stoneinscription:sha-${GITHUB_SHA::7} .

- name: Login To Docker Hub
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_PASSWORD }}

- name: Push Docker Images
run: |
docker push nayanmoni458/stoneinscription:${GITHUB_REF_NAME}
docker push nayanmoni458/stoneinscription:latest
docker push nayanmoni458/stoneinscription:sha-${GITHUB_SHA::7}
Loading