Skip to content

Commit

Permalink
Revert "Feature/snyk"
Browse files Browse the repository at this point in the history
  • Loading branch information
KevinOomenTheDeveloper authored Jun 18, 2024
1 parent 2538f10 commit dae1840
Show file tree
Hide file tree
Showing 23 changed files with 140 additions and 1,003 deletions.
Original file line number Diff line number Diff line change
@@ -1,16 +1,24 @@
name: development pipeline
# Sample workflow for building and deploying a Next.js site to GitHub Pages
#
# To get started with Next.js see: https://nextjs.org/docs/getting-started
#
name: Check NextJs build

on:
# Runs on pushes targeting the default branch
push:
branches: ["develop", "feature/*"]

branches: ["main"]

# Runs on any open or reopened pull request
pull_request:
branches: ["develop", "feature/*"]
types: [opened, reopened]

# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:

env:
API_KEY: ${{ secrets.API_KEY }}

# Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages
permissions:
contents: read
Expand Down Expand Up @@ -60,44 +68,3 @@ jobs:
run: ${{ steps.detect-package-manager.outputs.manager }} ${{ steps.detect-package-manager.outputs.command }}
- name: Build with Next.js
run: npm run build

sonarcloud:
runs-on: ubuntu-latest
needs: build
steps:
- name: Checkout
uses: actions/checkout@v4
- name: SonarCloud Scan
uses: SonarSource/sonarcloud-github-action@master
with:
args: >
-Dsonar.projectKey=SpotiCloud_frontend
-Dsonar.organization=spoticloud
-Dsonar.host.url=https://sonarcloud.io
-Dsonar.sources=./
env:
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}

snyk_scan:
runs-on: ubuntu-latest
needs: build
steps:
- name: Checkout code
uses: actions/checkout@v2

- name: Install Snyk CLI
run: npm install -g snyk # Install Snyk CLI globally

- name: Authenticate with Snyk
env:
SNYK_TOKEN: ${{ secrets.SNYK_TOKEN }}
run: npx snyk auth $SNYK_TOKEN

- name: Run Snyk security scan
run: npx snyk test --json > snyk-output.json

- name: Upload Snyk results
uses: actions/upload-artifact@v2
with:
name: snyk-results
path: snyk-output.json
2 changes: 0 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -34,5 +34,3 @@ yarn-error.log*
# typescript
*.tsbuildinfo
next-env.d.ts
.env.development
.env.docker
Loading

0 comments on commit dae1840

Please sign in to comment.