Skip to content

Commit afa9703

Browse files
authored
feat: adding sf.yml
1 parent 2096cb6 commit afa9703

File tree

3 files changed

+36
-69
lines changed

3 files changed

+36
-69
lines changed

.github/workflows/deploy.and.test.yml

Lines changed: 0 additions & 47 deletions
This file was deleted.

.github/workflows/manage.sf.api.versions.yml

Lines changed: 0 additions & 22 deletions
This file was deleted.

.github/workflows/sf.yml

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
name: Salesforce Code Analyzer Workflow
2+
on:
3+
- push
4+
- workflow_dispatch
5+
jobs:
6+
salesforce-code-analyzer-workflow:
7+
runs-on: ubuntu-latest
8+
steps:
9+
- name: Check out files
10+
uses: actions/checkout@v4
11+
12+
- name: Install Salesforce CLI
13+
run: npm install -g @salesforce/cli@latest
14+
15+
- name: Install Salesforce Code Analyzer Plugin
16+
run: sf plugins install @salesforce/sfdx-scanner@latest
17+
18+
- name: Run Salesforce Code Analyzer
19+
id: run-code-analyzer
20+
uses: forcedotcom/run-code-analyzer@v1
21+
with:
22+
run-command: run
23+
run-arguments: --category=security --target . --format=sarif --outfile results.sarif
24+
results-artifact-name: salesforce-code-analyzer-results
25+
26+
# - name: Check the outputs to determine whether to fail
27+
# if: |
28+
# steps.run-code-analyzer.outputs.exit-code > 0 ||
29+
# steps.run-code-analyzer.outputs.num-sev1-violations > 0 ||
30+
# steps.run-code-analyzer.outputs.num-violations > 10
31+
# run: exit 1
32+
33+
- name: Upload SARIF file
34+
uses: github/codeql-action/upload-sarif@v3
35+
with:
36+
sarif_file: results.sarif

0 commit comments

Comments
 (0)