[FORCE-903] Set secrets scan job #44
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: Unit tests | |
| on: | |
| push: | |
| branches: [main] | |
| pull_request: | |
| jobs: | |
| secrets_scan: | |
| name: Secrets scan | |
| runs-on: ubuntu-latest | |
| permissions: write-all | |
| timeout-minutes: 10 | |
| steps: | |
| - uses: actions/checkout@v4 | |
| with: | |
| fetch-depth: 0 | |
| - name: Get the secrets from GSM | |
| id: secrets_manager | |
| uses: toptal/actions/gsm-secrets@v1.0.2 | |
| with: | |
| workload_identity_provider: projects/858873486241/locations/global/workloadIdentityPools/gha-pool/providers/github-com | |
| service_account: gha-keycodes@toptal-ci.iam.gserviceaccount.com | |
| secrets_name: |- | |
| SLACK_BOT_TOKEN:toptal-ci/SLACK_BOT_TOKEN | |
| - name: Parse secrets | |
| id: parse_secrets | |
| uses: toptal/actions/expose-json-outputs@v1.0.2 | |
| with: | |
| json: ${{ steps.secrets_manager.outputs.secrets }} | |
| - name: Secrets Scan | |
| uses: toptal/actions/secret-scanning-action@main | |
| with: | |
| github-token: ${{ secrets.GITHUB_TOKEN }} | |
| full-scan: true | |
| slack-channel: -marketing-tools-2-releases | |
| slack-token: ${{ steps.parse_secrets.outputs.SLACK_BOT_TOKEN }} | |
| # unit_tests: | |
| # name: Unit tests | |
| # runs-on: ubuntu-latest | |
| # timeout-minutes: 5 | |
| # steps: | |
| # - name: Cancel previous runs | |
| # uses: styfle/cancel-workflow-action@0.11.0 | |
| # with: | |
| # access_token: ${{ github.token }} | |
| # - uses: actions/checkout@v3 | |
| # - name: Set up steps | |
| # uses: ./.github/actions/setup-steps | |
| # - name: Unit tests | |
| # run: yarn test:unit:coverage | |
| # - name: Upload Jest HTML report | |
| # if: failure() | |
| # uses: actions/upload-artifact@v4 | |
| # with: | |
| # name: jest-unit-tests-report | |
| # path: reports/jest-report-unit.html | |
| # retention-days: 1 | |
| # - name: Upload unit tests coverage report | |
| # uses: actions/upload-artifact@v4 | |
| # with: | |
| # name: jest-unit-coverage-report | |
| # path: test-coverage/unit | |
| # retention-days: 1 |