BST-18006 Add the gitlab-ci scan tests #1
Workflow file for this run
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: Smoke Tests | |
| on: | |
| pull_request: | |
| types: [opened, synchronize, reopened] | |
| paths: ['scanners/**'] | |
| jobs: | |
| gitlab-ci: | |
| name: Gitlab-CI | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Generate GitLab OAuth Token | |
| id: gitlab-token | |
| run: | | |
| response=$(curl -s -X POST "https://gitlab.com/oauth/token" \ | |
| -d "grant_type=client_credentials" \ | |
| -d "client_id=${{ secrets.BOOST_SCAN_RUNNER_GITLAB_CLIENT_ID }}" \ | |
| -d "client_secret=${{ secrets.BOOST_SCAN_RUNNER_GITLAB_CLIENT_SECRET }}") | |
| token=$(echo "$response" | jq -r '.access_token') | |
| echo "token=$token" >> $GITHUB_OUTPUT | |
| echo "::add-mask::$token" | |
| - name: Checkout scanner registry | |
| uses: actions/checkout@v4 | |
| with: | |
| fetch-depth: 0 # Need full history to detect changes | |
| - name: Run Tests | |
| uses: boostsecurityio/scan-test-action@03526a5475206e034c62f3e2b8abafb9e8e15e85 | |
| with: | |
| provider: gitlab-ci | |
| provider-config: | | |
| { | |
| "token": "${{ steps.github-token.outputs.token }}", | |
| "project_id": "boostsecurityio/martin/boostsec-registry-test-runner", | |
| } | |
| registry-repo: "${{ github.repository_owner }}/${{ github.event.repository.name }}" | |
| base-ref: "${{ github.head_ref }}" |