About this project
Defang GitHub Action is a CI/CD integration that streamlines deploying Compose-based projects to major cloud providers through the Defang platform. It supports deploying to your own AWS, Azure, or GCP accounts, as well as the Defang Playground.
Key features include:
- **Simple deployment**: Add a single step to your GitHub workflow to deploy a Compose-based project. The action requires `contents: read` and `id-token: write` permissions.
- **Secrets management**: Securely pass GitHub Actions Secrets to the cloud as Defang config values. You specify which environment variables to publish via the `config-env-vars` input, ensuring only explicitly listed secrets are pushed to the cloud.
- **Subdirectory projects**: Use the `cwd` input to point to a Compose file located in a subdirectory rather than the repository root.
- **CLI version control**: Pin a specific Defang CLI version (e.g., `v3.5.2`), use `nightly` for the latest unstable build, or pass a Git ref (branch name or commit SHA) to build the CLI from source.
- **Custom commands**: Override the default `compose up` command with any Defang CLI command and arguments via the `command` input.
- **Output capture**: Optionally capture the command's stdout as a step output (`outputs.stdout`) using `capture-output: true`. This is disabled by default because large deployments can exceed GitHub Actions memory limits.
- **Deployment summary**: When running `compose up`, the action automatically calls `defang services --json` and writes a table of deployed services (with public endpoints as clickable links) to the GitHub job summary. It also exposes the primary public HTTPS endpoint as the `endpoint` output, which can be wired into the job's `environment.url` for a clickable "View deployment" link on the run page, Environments tab, and repo sidebar. The summary can be toggled with the `summary` input.
- **Additional inputs**: Supports `compose-files` to specify custom Compose file paths, `stack` to select a deployment stack, and `verbose` for detailed logging.
The action is designed to keep deployment workflows concise while providing fine-grained control over configuration, versioning, and output handling.
Comments
0 Rating appears after 10 ratings
Sign in to join the discussion.