diff --git a/.github/workflows/security-guardian.yml b/.github/workflows/security-guardian.yml index 373e9fe8da88e..9628ba4c00d8f 100644 --- a/.github/workflows/security-guardian.yml +++ b/.github/workflows/security-guardian.yml @@ -3,21 +3,23 @@ on: pull_request: {} jobs: + log-skip: + if: | + startsWith(github.event.pull_request.title, 'chore(release):') || + startsWith(github.event.pull_request.title, 'chore(merge-back):') + runs-on: ubuntu-latest + steps: + - run: echo "Skipping Security Guardian for release/merge-back PR" run-security-guardian: + if: | + !startsWith(github.event.pull_request.title, 'chore(release):') && + !startsWith(github.event.pull_request.title, 'chore(merge-back):') runs-on: ubuntu-latest steps: - - name: Skip check for release PRs - if: | - ( - startsWith(github.event.pull_request.title, 'chore(release):') || - startsWith(github.event.pull_request.title, 'chore(merge-back):') - ) - run: echo "Skipping Security Guardian for release PR" && exit 0 - - name: Checkout uses: actions/checkout@v4 with: - fetch-depth: 0 # Required to enable full git diff + fetch-depth: 0 - name: Install cfn-guard run: |