File tree Expand file tree Collapse file tree 1 file changed +5
-4
lines changed
Expand file tree Collapse file tree 1 file changed +5
-4
lines changed Original file line number Diff line number Diff line change 11on :
22 schedule :
3- # Runs at 00 :30 and 02 :30.
4- - cron : ' 30 0, 2 * * *'
3+ # Runs at 12 :30, 1:30 and 2 :30.
4+ - cron : ' 30 0- 2 * * *'
55 workflow_dispatch :
66
77name : codegen
1717 with :
1818 script : |
1919 console.log('checking size of services')
20- const MAX_SERVICE_SIZE = 400 // 00:30 and 02:30 implies 2 batches of size 200
20+ const MAX_SERVICE_SIZE = 300 // 00:30 to 02:30 implies 3 batches of size 100
2121 const services = ${{ needs.discovery.outputs.services }}
2222 if (services.length > MAX_SERVICE_SIZE) {
2323 throw new Error(`Total services (${services.length}) exceed limit of ${MAX_SERVICE_SIZE}`)
3535 console.log('splitting service names list into batches')
3636 const services = ${{ needs.discovery.outputs.services }}
3737 const hour = new Date().getHours()
38- const MAX_BATCH_SIZE = 200
38+ const MAX_BATCH_SIZE = 100
3939 const result = {
4040 batches: [],
4141 hour: new Date().getHours(),
4848 uses : googleapis/google-api-java-client-services/.github/workflows/generate.yaml@main
4949 needs : batch
5050 secrets : inherit
51+ # The number of batch is implicitly decided by the hour of the day
5152 if : ${{!!fromJson(needs.batch.outputs.services).batches[fromJson(needs.batch.outputs.services).hour]}}
5253 with :
5354 services : ${{toJson(fromJson(needs.batch.outputs.services).batches[fromJson(needs.batch.outputs.services).hour])}}
You can’t perform that action at this time.
0 commit comments