Skip to content

Commit

Permalink
chore(ci): use SHA as reference for integration test workflow instead…
Browse files Browse the repository at this point in the history
… of branch. (#29787)

### Reason for this change

It is better to use an immutable commit reference for workflows that require approval, since the branch's head commit can change between the time of approval and workflow run execution.

### Description of changes

Updated the `ref` parameter to use the SHA from the pull_request event instead of the ref.

### 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*
  • Loading branch information
AdnaneKhan authored Apr 10, 2024
1 parent 0b429fb commit f7d4f41
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion .github/workflows/request-cli-integ-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ jobs:
with:
# Needs to run with PROJEN_GITHUB_TOKEN because we need permissions to force push the branch
token: ${{ secrets.PROJEN_GITHUB_TOKEN }}
ref: ${{ github.event.pull_request.head.ref }}
ref: ${{ github.event.pull_request.head.sha }}
repository: ${{ github.event.pull_request.head.repo.full_name }}
- name: Submit to test-pipeline
run: |
Expand Down

0 comments on commit f7d4f41

Please sign in to comment.