Skip to content

organize files

organize files #70

Workflow file for this run

name: Build, Test, and Push
on:
push:
branches:
- "**"
pull_request:
branches:
- "**"
jobs:
scan:
name: Gitleaks Scan
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Run Gitleaks
uses: gitleaks/gitleaks-action@v2
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
GITLEAKS_LICENSE: ${{ secrets.GITLEAKS_LICENSE }}
build-test:
name: Build and Test
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v2
- name: Setup Node.js
uses: actions/setup-node@v3
with:
node-version: 14
- name: Install dependencies
run: npm install
- name: Run lint tests
run: npm run lint
- name: Run unit tests
run: npm run test
- name: Dependency Check
uses: dependency-check/Dependency-Check_Action@main
with:
project: 'messaging-app'
path: '.'
format: 'HTML'
out: 'reports'
args: >
--failOnCVSS 7
--enableRetired
- name: Upload Dependency Check Report
uses: actions/upload-artifact@v2
with:
name: Dependency Check report
path: ${{ github.workspace }}/reports
docker:
name: Docker Build and Push
runs-on: ubuntu-latest
needs: build-test
steps:
- name: Login to Docker Hub
uses: docker/[email protected]
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
- name: Build and Run Docker Containers
run: |
docker-compose up -d && \
docker ps && sleep 5
- name: Build and Push to Docker Hub
uses: docker/[email protected]
with:
context: .
push: true
tags: dasha12678/messaging-app:latest