Skip to content
Open
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
2 changes: 1 addition & 1 deletion .github/workflows/deploy.yml → .github/workflows/cd.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
run: cp .env.example .env

- name: Docker Setup [Login]
uses: docker/login-action@v4

Check failure on line 20 in .github/workflows/cd.yml

View check run for this annotation

SonarQubeCloud / SonarCloud Code Analysis

Use full commit SHA hash for this dependency.

See more on https://sonarcloud.io/project/issues?id=LondheShubham153_devboard&issues=AZ_Wwy1rhaspFr9CM0rq&open=AZ_Wwy1rhaspFr9CM0rq&pullRequest=60
with:
username: ${{ vars.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
Expand All @@ -25,4 +25,4 @@
- name: Deploy the containers with Docker Compose
run: |
docker compose pull
docker compose up -d
docker compose up -d
90 changes: 90 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,90 @@
# Goal - I have to Lint, Build, Test the code for Frontend & Backend
# then Push the images to DockerHub
name: CI

on:
push:
branches: [master]

jobs:
frontend:
# Github runner
runs-on: ubuntu-latest
steps:
- name: Checkout Code
uses: actions/checkout@v7

- name: Setup NodeJs
uses: actions/setup-node@v6
with:
node-version: '20'
cache: npm
cache-dependency-path: frontend/package-lock.json

- name: Install npm Packages
run: npm install

Check warning on line 25 in .github/workflows/ci.yml

View check run for this annotation

SonarQubeCloud / SonarCloud Code Analysis

Omitting "--ignore-scripts" allows lifecycle scripts to run during package installation.

See more on https://sonarcloud.io/project/issues?id=LondheShubham153_devboard&issues=AZ_Wwy21haspFr9CM0rr&open=AZ_Wwy21haspFr9CM0rr&pullRequest=60

Check warning on line 25 in .github/workflows/ci.yml

View check run for this annotation

SonarQubeCloud / SonarCloud Code Analysis

Using dependencies without locking resolved versions is security-sensitive.

See more on https://sonarcloud.io/project/issues?id=LondheShubham153_devboard&issues=AZ_Wwy21haspFr9CM0rs&open=AZ_Wwy21haspFr9CM0rs&pullRequest=60
working-directory: frontend

- name: Run Linter
run: npm run lint
working-directory: frontend

- name: Run Tests
run: npm run test
working-directory: frontend

- name: Docker Setup [Login]
uses: docker/login-action@v4

Check failure on line 37 in .github/workflows/ci.yml

View check run for this annotation

SonarQubeCloud / SonarCloud Code Analysis

Use full commit SHA hash for this dependency.

See more on https://sonarcloud.io/project/issues?id=LondheShubham153_devboard&issues=AZ_Wwy21haspFr9CM0rt&open=AZ_Wwy21haspFr9CM0rt&pullRequest=60
with:
username: ${{ vars.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}

- name: Docker Build and Push
uses: docker/build-push-action@v7

Check failure on line 43 in .github/workflows/ci.yml

View check run for this annotation

SonarQubeCloud / SonarCloud Code Analysis

Use full commit SHA hash for this dependency.

See more on https://sonarcloud.io/project/issues?id=LondheShubham153_devboard&issues=AZ_Wwy21haspFr9CM0ru&open=AZ_Wwy21haspFr9CM0ru&pullRequest=60
with:
context: ./frontend
push: true
tags: ${{ vars.DOCKERHUB_USERNAME }}/devboard-frontend:latest

backend:
# Github runner
runs-on: ubuntu-latest
steps:
- name: Checkout Code
uses: actions/checkout@v7

- name: Setup Go
uses: actions/setup-go@v6
with:
go-version: '1.23'
go-version-file: 'go.mod'
cache-dependency-path: go.sum

- name: Run Go Formatter
run: go fmt
working-directory: backend

- name: Run Go Vet
run: go vet
working-directory: backend

- name: Run Tests
run: go test
working-directory: backend

- name: Docker Setup [Login]
uses: docker/login-action@v4

Check failure on line 76 in .github/workflows/ci.yml

View check run for this annotation

SonarQubeCloud / SonarCloud Code Analysis

Use full commit SHA hash for this dependency.

See more on https://sonarcloud.io/project/issues?id=LondheShubham153_devboard&issues=AZ_Wwy21haspFr9CM0rv&open=AZ_Wwy21haspFr9CM0rv&pullRequest=60
with:
username: ${{ vars.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}

- name: Docker Build and Push
uses: docker/build-push-action@v7

Check failure on line 82 in .github/workflows/ci.yml

View check run for this annotation

SonarQubeCloud / SonarCloud Code Analysis

Use full commit SHA hash for this dependency.

See more on https://sonarcloud.io/project/issues?id=LondheShubham153_devboard&issues=AZ_Wwy21haspFr9CM0rw&open=AZ_Wwy21haspFr9CM0rw&pullRequest=60
with:
context: ./backend
push: true
tags: ${{ vars.DOCKERHUB_USERNAME }}/devboard-backend:latest
deploy:
needs: [frontend,backend]
uses: ./.github/workflows/cd.yml
secrets: inherit
43 changes: 0 additions & 43 deletions .github/workflows/code-quality.yml

This file was deleted.

38 changes: 0 additions & 38 deletions .github/workflows/code-tests.yml

This file was deleted.

24 changes: 0 additions & 24 deletions .github/workflows/dast.yml

This file was deleted.

47 changes: 0 additions & 47 deletions .github/workflows/dependency-scan.yml

This file was deleted.

53 changes: 0 additions & 53 deletions .github/workflows/devsecops.yml

This file was deleted.

31 changes: 0 additions & 31 deletions .github/workflows/docker-push.yml

This file was deleted.

44 changes: 0 additions & 44 deletions .github/workflows/docker-scans.yml

This file was deleted.

Loading