Update deploy scripts #6
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: Sentinel Security Gate | |
| on: | |
| push: | |
| branches: [ main ] | |
| pull_request: | |
| branches: [ main ] | |
| jobs: | |
| security-check: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout Code | |
| uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 | |
| - name: Install Sentinel | |
| env: | |
| INSTALL_TOKEN: ${{ secrets.SENTINEL_INSTALL_TOKEN }} | |
| run: | | |
| python -m pip install --upgrade pip | |
| # Admin must replace placeholder with their private repo | |
| pip install git+https://x-access-token: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@github.com/DataWizual/sentinel-core.git@main | |
| - name: Execute Security Scan | |
| id: scan_step | |
| env: | |
| # Automatically binds reporting to the client's repository | |
| SENTINEL_AUTHORIZED_REPO: ${{ github.repository }} | |
| SENTINEL_ALERT_TOKEN: ${{ secrets.SENTINEL_ALERT_TOKEN }} | |
| run: sentinel scan . --report | |
| continue-on-error: true | |
| - name: Upload Security Report | |
| if: steps.scan_step.outcome == 'failure' | |
| uses: actions/upload-artifact@65c4c4a1ddee5b72f698fdd19549f0f0fb45cf08 | |
| with: | |
| name: sentinel-security-report | |
| path: sentinel_report.html | |
| retention-days: 7 | |
| - name: Terminate on Failure | |
| if: steps.scan_step.outcome == 'failure' | |
| run: exit 1 |