This repository is the single source of truth for CI/CD logic across the FlagOS AI organization. It contains unified GitHub Actions (individual steps) and Reusable Workflows (entire pipelines) to ensure consistency, security, and speed across all our projects.
Network is fine most of the time?
└─ yes → checkout-retry (simple, 3 retries, 30s sleep)
└─ no, fetches can hang/stall
├─ have a deploy key? → robust-checkout with ssh-key
└─ no key (fork PRs)? → robust-checkout (HTTPS only)
Triggered by issue_comment and need to land on the PR branch?
└─ yes → checkout-retry (or robust-checkout) + checkout-pr
📌 Best Practices
1. Versioning
For production-critical repositories, avoid using @main. Instead, reference a specific version tag or commit SHA to prevent breaking changes:
FlagOS DevOps Central
This repository is the single source of truth for CI/CD logic across the FlagOS AI organization. It contains unified GitHub Actions (individual steps) and Reusable Workflows (entire pipelines) to ensure consistency, security, and speed across all our projects.
📁 Repository Structure
🚀 How to use Shared Workflows
Reusable workflows allow you to standardize entire CI pipelines (e.g., testing, linting, and deploying) with just a few lines of code.
Usage Example
In your application repository (e.g.,
flagos-ai/model-api), create a file at.github/workflows/ci.yml:🛠 How to use Shared Actions
Custom actions are discrete tasks used within your own existing jobs.
Usage Example
In any workflow file within the organization:
Available Actions
Checkout
checkout-retryactions/checkoutwith up to 3 attempts and 30s sleep between failures. Use for transient network errors.checkout-prghCLI and checks out a PR branch by number. Required forissue_comment-triggered workflows.robust-checkoutSetup
setup-projectAVAILABLE_GPUS.setup-poetryTesting
run-ondemand-testReporting
post-pytest-reportpost-benchmark-reportNotifications
notify-slack🔄 Choosing the right checkout action
📌 Best Practices
1. Versioning
For production-critical repositories, avoid using
@main. Instead, reference a specific version tag or commit SHA to prevent breaking changes:2. Contributions
inputsandoutputsin aREADME.mdalongsideaction.yml.3. Containerized runners
Actions used inside Docker containers (e.g.
container:jobs) cannot resolve local./action refs. Always use fully-qualified refs for these jobs:📞 Support
For questions regarding CI/CD standards or help with these actions, please contact the Infrastructure team or open an issue in this repository.