change owasp stage #63
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Build, Test and Push | |
on: | |
push: | |
branches: | |
- "**" | |
pull_request: | |
branches: | |
- "**" | |
jobs: | |
scan: | |
name: gitleaks | |
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: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v2 | |
- name: Setup Node | |
uses: actions/setup-node@v3 | |
with: | |
node-version: 20 | |
- name: Install dependencies | |
run: npm install | |
- name: Run lint tests | |
run: npm run lint | |
- name: Run unit tests | |
run: npm run test | |
- name: Depcheck | |
uses: dependency-check/Dependency-Check_Action@main | |
id: Depcheck | |
with: | |
project: 'test' | |
path: '.' | |
format: 'HTML' | |
out: 'reports' # this is the default, no need to specify unless you wish to override it | |
args: > | |
--failOnCVSS 7 | |
--enableRetired | |
- name: Upload Dependency Check Test results | |
uses: actions/upload-artifact@master | |
with: | |
name: Depcheck report | |
path: ${{github.workspace}}/reports | |
- 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 |