Skip to content

Commit 6bd78f7

Browse files
authored
ci: build code again on main to pre-fill the rosetta cache (#34834)
### Reason for this change [Restrictions for accessing a cache](https://docs.github.com/en/actions/how-tos/writing-workflows/choosing-what-your-workflow-does/caching-dependencies-to-speed-up-workflows#restrictions-for-accessing-a-cache) effectively limit a PR to use the rosetta cache either from the same branch or the main branch. Because we currently don't fill the rosetta cache on main, most PRs cannot use this cache. Using the cache removes ~14min of most builds. This is a worthwhile investment. ### Description of changes Run the PR build against `main` and `v2-release` to always fill up the rosetta cache. We could probably set this up to skip tests, but for now this is easier. Also adds manual (always helpful) and merge group trigger (future proofing) to the build. ### Describe any new or updated permissions being added n/a ### Description of how you validated changes Reading the GitHub docs. Needs merging to actually validate. ### 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 420ea3f commit 6bd78f7

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

.github/workflows/pr-build.yml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,12 @@
11
name: PR Build
22

33
on:
4+
workflow_dispatch: {}
5+
merge_group: {}
6+
push:
7+
branches:
8+
- main
9+
- v2-release
410
pull_request:
511
branches:
612
- main

0 commit comments

Comments
 (0)