ci(sage-monorepo): test sonar scan from PR from fork #6
Workflow file for this run
This file contains 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: Scan affected projects with Sonar | |
on: | |
pull_request_target: | |
types: [opened, synchronize, reopened] | |
env: | |
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }} | |
jobs: | |
push: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
with: | |
ref: ${{ github.event.pull_request.head.ref }} | |
repository: ${{ github.event.pull_request.head.repo.full_name }} | |
fetch-depth: 0 | |
- run: | | |
echo "github.event.pull_request.head.ref: ${{ github.event.pull_request.head.ref }}" | |
echo "repository: ${{ github.event.pull_request.head.repo.full_name }}" | |
- name: Derive appropriate SHAs for base and head for `nx affected` commands | |
uses: nrwl/nx-set-shas@v3 | |
- name: Can read sonar token | |
run: if [ -z ${SONAR_TOKEN+x} ]; then echo "var is unset"; else echo "var is set to XXX"; fi | |
# - name: Set up the dev container | |
# uses: ./.github/actions/setup-dev-container | |
# - name: Scan the affected projects with Sonar | |
# run: | | |
# devcontainer exec --workspace-folder ../sage-monorepo bash -c ". ./dev-env.sh \ | |
# && nx affected --target=sonar" |