Skip to content
Draft
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion .github/workflows/codegen.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -54,14 +54,18 @@ jobs:
for (let i = 0; i < filteredServices.length; i += MAX_BATCH_SIZE) {
result.batches.push(filteredServices.slice(i, i + MAX_BATCH_SIZE))
}
console.log(result)
if (result.hour > 2) {
console.warn(`Unexpected hour of the day: ${result.hour} from Date(${new Date()})`)
}
return result
generate:
uses: googleapis/google-api-java-client-services/.github/workflows/generate.yaml@main
needs: batch
secrets: inherit
# The size of the batch is implicitly decided by the hour of the day.
# For example, a job starting at "1:30" uses the chunk at the index 1 in the array.
if: github.event_name != 'workflow_dispatch' && ${{!!fromJson(needs.batch.outputs.services).batches[fromJson(needs.batch.outputs.services).hour]}}
if: ${{github.event_name != 'workflow_dispatch' && !!fromJson(needs.batch.outputs.services).batches[fromJson(needs.batch.outputs.services).hour]}}
with:
services: ${{toJson(fromJson(needs.batch.outputs.services).batches[fromJson(needs.batch.outputs.services).hour])}}
generate_dispatch:
Expand Down
Loading