Skip to content

Commit bcfeb69

Browse files
chore(security-guardian): skip release and mergeback PRs (#34454)
### Issue # (if applicable) Closes #<issue number here>. An issue where skipping release and merge back PRs dint work because this code just skips the step ``` run: echo "Skipping Security Guardian for release PR" && exit 0 ``` ### Reason for this change ### Description of changes ### Describe any new or updated permissions being added N/A ### Description of how you validated changes ### Checklist - [ x] My code adheres to the [CONTRIBUTING GUIDE](https://github.com/aws/aws-cdk/blob/main/CONTRIBUTING.md) and [DESIGN GUIDELINES](https://github.com/aws/aws-cdk/blob/main/docs/DESIGN_GUIDELINES.md) ---- *By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license*
1 parent 039a3aa commit bcfeb69

File tree

1 file changed

+11
-9
lines changed

1 file changed

+11
-9
lines changed

.github/workflows/security-guardian.yml

Lines changed: 11 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -3,21 +3,23 @@ on:
33
pull_request: {}
44

55
jobs:
6+
log-skip:
7+
if: |
8+
startsWith(github.event.pull_request.title, 'chore(release):') ||
9+
startsWith(github.event.pull_request.title, 'chore(merge-back):')
10+
runs-on: ubuntu-latest
11+
steps:
12+
- run: echo "Skipping Security Guardian for release/merge-back PR"
613
run-security-guardian:
14+
if: |
15+
!startsWith(github.event.pull_request.title, 'chore(release):') &&
16+
!startsWith(github.event.pull_request.title, 'chore(merge-back):')
717
runs-on: ubuntu-latest
818
steps:
9-
- name: Skip check for release PRs
10-
if: |
11-
(
12-
startsWith(github.event.pull_request.title, 'chore(release):') ||
13-
startsWith(github.event.pull_request.title, 'chore(merge-back):')
14-
)
15-
run: echo "Skipping Security Guardian for release PR" && exit 0
16-
1719
- name: Checkout
1820
uses: actions/checkout@v4
1921
with:
20-
fetch-depth: 0 # Required to enable full git diff
22+
fetch-depth: 0
2123

2224
- name: Install cfn-guard
2325
run: |

0 commit comments

Comments
 (0)