Skip to content

Commit a1cbcf9

Browse files
authored
fix(ci): checkout the pr head instead of the default main head (#36311)
### Issue # (if applicable) Closes #<issue number here>. ### Reason for this change Fix the invalid revision range issues : https://github.com/aws/aws-cdk/actions/runs/19970012866/job/57272071527 Since the action checks out the main branch HEAD instead of PR branch HEAD : https://github.com/aws/aws-cdk/actions/runs/19970012866/job/57272071527#step:2:1094 Inspired from : https://github.com/aws/aws-cdk/blob/main/.github/workflows/integration-test-deployment.yml#L39C11-L39C57 ### Description of changes ### Describe any new or updated permissions being added ### Description of how you validated changes ### Checklist - [ ] 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 1cc503a commit a1cbcf9

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

.github/workflows/security-guardian.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@ jobs:
1919
- name: Checkout
2020
uses: actions/checkout@v6
2121
with:
22+
ref: ${{ github.event.pull_request.head.sha }}
2223
fetch-depth: 0
2324

2425
- name: Install cfn-guard
@@ -51,4 +52,4 @@ jobs:
5152
if: always()
5253
with:
5354
name: security-guardian-reports
54-
path: test-results/
55+
path: test-results/

0 commit comments

Comments
 (0)