Skip to content

Commit

Permalink
ci(sage-monorepo): test sonar scan from PR from fork (#2455)
Browse files Browse the repository at this point in the history
* Touch OC web app

* Touch the file again

* Fetch correct branch

* Undo changes to web app
  • Loading branch information
tschaffter authored Jan 25, 2024
1 parent 71fcf75 commit cf36874
Showing 1 changed file with 12 additions and 7 deletions.
19 changes: 12 additions & 7 deletions .github/workflows/sonar-scan.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,20 +11,25 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
name: Checkout [${{ github.ref_name }}]
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: 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"
# - name: Scan the affected projects with Sonar
# run: |
# devcontainer exec --workspace-folder ../sage-monorepo bash -c ". ./dev-env.sh \
# && nx affected --target=sonar"

0 comments on commit cf36874

Please sign in to comment.