Skip to content

Commit ce360cf

Browse files
authored
Create embold-scan.yml
1 parent c64384a commit ce360cf

1 file changed

Lines changed: 47 additions & 0 deletions

File tree

.github/workflows/embold-scan.yml

Lines changed: 47 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,47 @@
1+
# .github/workflows/embold-scan.yml
2+
3+
name: Embold Code Quality Scan
4+
5+
# This workflow runs on every push to the 'main' branch
6+
on:
7+
push:
8+
branches: [ master ]
9+
pull_request:
10+
branches: [ master ]
11+
workflow_dispatch:
12+
13+
jobs:
14+
embold-scan:
15+
# Use the latest version of Ubuntu to run the job
16+
runs-on: ubuntu-latest
17+
18+
steps:
19+
# Step 1: Check out your repository code so the workflow can access it
20+
- name: Checkout Repository
21+
uses: actions/checkout@v4
22+
23+
# Step 2: Download and extract the Embold scanner
24+
- name: Download and Extract Scanner
25+
run: |
26+
curl https://v1.embold.io/nfs/CLI/browserstack-codequality-scanner.tar.gz -o browserstack-codequality-scanner-archive.tar.gz
27+
tar xvf browserstack-codequality-scanner-archive.tar.gz
28+
29+
# Step 3: Download the repository configuration file using a secure token
30+
- name: Download Repository Configuration
31+
run: |
32+
curl --silent --location --request GET "http://3.66.212.6:3000/api/v1/repositories/56767304e7891c4b5c593db9b9d7e7d8/scans/config/download" --header "Authorization: Bearer ${{ secrets.EMBOLD_SCAN_TOKEN }}" -o repository-configuration.json
33+
34+
# Step 4: Run the Embold analysis scanner
35+
- name: Run Embold Scanner
36+
env:
37+
EMBOLD_TOKEN: ${{ secrets.EMBOLD_SCAN_TOKEN }}
38+
run: |
39+
./browserstack-codequality-scanner/bin/embold-scanner analyse \
40+
-u http://3.66.212.6:3000/ \
41+
-t $EMBOLD_TOKEN \
42+
-r 56767304e7891c4b5c593db9b9d7e7d8 \
43+
-b . \
44+
-d ./embold-data \
45+
-c ./repository-configuration.json \
46+
-l ./embold-log \
47+
-sh ./embold-scanner-home

0 commit comments

Comments
 (0)