This action downloads the BrowserStack CQ Scanner (Embold scanner CLI) and runs static code analysis on your repository locally.
Sources and documentation in this repository are released under the AGPL v3. See LICENSE.
Required URL of your Embold instance. e.g. : https://demo.embold.io/
Required Your Embold access token (recommended: Use a secret)
Required Repository UID of the Embold repository where the results will be published. How to get your repository UID?
Optional URL to download the BrowserStack CQ Scanner. Default: https://v1.embold.io/nfs/CLI/browserstack-codequality-scanner.tar.gz
Optional Path to the repository configuration JSON file. Default: repository-configuration.json
Optional Download repository configuration from Embold server. Default: false
Optional Path where downloaded config will be saved. Default: repository-configuration.json
Optional Temporary directory for scanner artifacts. Default: ./temp
Optional Base directory of the source code to scan. Default: .
Optional Enable verbose logging. Default: true
Optional Enable quality gate checking. Default: false
Optional Continue workflow execution even if scan fails. Default: true
Status of the scan
Quality gate status (PASSED/FAILED)
Quality gate detailed data
- name: Run Embold Scan
uses: embold/github-action-docker@v1.0
with:
emboldUrl: https://demo.embold.io/
emboldToken: ${{ secrets.EMBOLD_TOKEN }}
emboldRepoUid: ${{ secrets.EMBOLD_REPO_UID }}- name: Run Embold Scan
uses: embold/github-action-docker@v1.0
with:
emboldUrl: https://demo.embold.io/
emboldToken: ${{ secrets.EMBOLD_TOKEN }}
emboldRepoUid: 81aba9b3940bbf35aac36dd3e4a45562
downloadConfig: 'true'- name: Run Embold Scan with Quality Gate
id: embold-scan
uses: embold/github-action-docker@v1.0
with:
emboldUrl: https://demo.embold.io/
emboldToken: ${{ secrets.EMBOLD_TOKEN }}
emboldRepoUid: 81aba9b3940bbf35aac36dd3e4a45562
qualityGate: 'true'
- name: Check Quality Gate Result
if: steps.embold-scan.outputs.qualityGateStatus == 'FAILED'
run: |
echo "Quality gate failed!"
exit 1name: Embold Code Quality Analysis
on:
push:
branches: [ main, develop ]
pull_request:
branches: [ main ]
jobs:
embold-scan:
runs-on: ubuntu-latest
steps:
- name: Checkout Repository
uses: actions/checkout@v4
- name: Run Embold Scan
uses: embold/github-action-docker@v1.0
with:
emboldUrl: https://demo.embold.io/
emboldToken: ${{ secrets.EMBOLD_TOKEN }}
emboldRepoUid: ${{ secrets.EMBOLD_REPO_UID }}
repositoryConfigPath: repository-configuration.json
verbose: true
qualityGate: 'true'- A repository configuration JSON file (default:
repository-configuration.jsonin the root directory) or enabledownloadConfig - Embold access token stored as a GitHub secret
- Embold repository UID
- Optionally downloads the repository configuration from Embold server
- Downloads the BrowserStack CQ Scanner from the specified URL
- Extracts the scanner archive
- Runs the Embold scanner with the provided configuration
- Publishes results to the specified Embold repository
- Optionally checks and outputs the quality gate status
For issues and questions, please visit the Embold documentation or contact Embold support.