$ show aws-actions/aws-codebuild-run-build
This repository implements a GitHub Action that triggers AWS CodeBuild builds. It starts a build using the AWS SDK, streams CloudWatch Logs to the GitHub Action output, and waits for the build to complete. The action handles rate limiting with exponential backoff and jitter, and supports cancelling builds via signal handling. The core logic is in `code-build.js`, which exports functions for building, waiting for completion, and processing inputs. The action is designed to be used in GitHub workflows but can also be run locally via the `local.js` script.
The LLM identified 1 files worth highlighting for reuse:
The `waitForBuildEndTime` function in this file implements a resilient polling mechanism for AWS CodeBuild builds. It handles API rate limiting with exponential backoff and full jitter, streams CloudWatch Logs in real-time, and correctly detects build completion by checking for two consecutive empty log responses after the build ends. This function is decoupled from GitHub Actions-specific logic (only uses console.log for output) and can be reused in other Node.js projects that need to monitor long-running AWS operations.