Javascript GitHub Action Setup

Prerequisite:

- Add CloudDefense API key into repository secret

Steps:

1. Project > Actions > new workflow > setup workflow yourself
2. Name workflow and add the following content.
1
name: Javascript application
2
​
3
on:
4
push:
5
branches: [ main ]
6
pull_request:
7
branches: [ main ]
8
9
jobs:
10
build:
11
12
runs-on: ubuntu-latest
13
14
steps:
15
- uses: actions/[email protected]
16
- name: Use Node.js 12
17
uses: actions/[email protected]
18
with:
19
node-version: 12
20
- name: Install dependencies
21
run: |
22
npm install
23
24
- uses: actions/[email protected]
25
- name: Run CloudDefense to check for vulnerabilities
26
uses: cdefense/actions/[email protected]
27
with:
28
project-name: JavaScript_Github_Action_Test_1
29
api-key: ${{ secrets.PROD_API_KEY }}
Copied!
3 – See the result of github action in Project > Actions

How to Integrate GitHub Actions for JavaScript

1
https://youtu.be/D9LXgDJ3--w
Copied!
Last modified 2mo ago