From 0b3ee0b2e9d355c9d199699989dadd238f4a2ebd Mon Sep 17 00:00:00 2001 From: JonJagger Date: Sun, 23 Nov 2025 09:46:56 +0000 Subject: [PATCH] Investigate needs: behaviour --- .github/workflows/main.yml | 27 ++++++--------------------- 1 file changed, 6 insertions(+), 21 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 88b42c1..6626d2f 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -5,33 +5,18 @@ on: jobs: - snyk-code-scan: + first: + if: ${{ github.ref == 'refs/heads/main' }} runs-on: ubuntu-latest needs: [] - env: - SARIF_FILENAME: snyk.code.scan.json steps: - uses: actions/checkout@v4 + second: + runs-on: ubuntu-latest + needs: [first] + steps: - name: Show repo url run: echo "X ${{ github.server_url }}/${{ github.repository_owner }} X" - - name: Setup Snyk - uses: snyk/actions/setup@master - - - name: Run Snyk code scan - env: - SNYK_TOKEN: ${{ secrets.SNYK_TOKEN }} - run: | - set +e - snyk code test \ - --policy-path=.snyk \ - --sarif \ - --sarif-file-output="${SARIF_FILENAME}" \ - ./bad_dir - STATUS=$? - set -e - echo "STATUS=:${STATUS}:" - cat "${SARIF_FILENAME}" -