Skip to content

feat: add env-file input for compose interpolation#51

Open
defangdevs wants to merge 1 commit into
DefangLabs:mainfrom
defangdevs:feature/env-file-input
Open

feat: add env-file input for compose interpolation#51
defangdevs wants to merge 1 commit into
DefangLabs:mainfrom
defangdevs:feature/env-file-input

Conversation

@defangdevs

Copy link
Copy Markdown

What

Adds an env-file input so workflows can point Compose interpolation at a non-default environment file (e.g. .env.production), matching docker compose --env-file.

The input is mapped to the COMPOSE_ENV_FILES environment variable that the Defang CLI reads (whitespace-delimited input is converted to the comma-separated form the CLI expects), the same way project maps to COMPOSE_PROJECT_NAME. Using the env var means it applies to whatever command runs, not just compose up.

Depends on the CLI-side support in DefangLabs/defang#2178.

Usage

- uses: DefangLabs/defang-github-action@v2
  with:
    env-file: ".env.production"        # or: ".env .env.production"

Changes

  • action.yaml: new env-file input; set COMPOSE_ENV_FILES in the env-setup step.
  • README.md: new "Using an Environment File" section.
  • .github/workflows/test.yaml + test/compose.envfile.yaml + test/action.env: a step that runs compose config with env-file and asserts the interpolated value reaches the CLI output.

🤖 Generated with Claude Code

https://claude.ai/code/session_01Sw7j9FYnbChZJbYArxbhuo

Exposes the CLI's new --env-file support via a COMPOSE_ENV_FILES
environment variable, so workflows can point compose interpolation at a
non-default env file (e.g. .env.production). Whitespace-delimited input
is converted to the comma-separated form the CLI expects, matching how
`project` maps to COMPOSE_PROJECT_NAME.

- action.yaml: new env-file input; set COMPOSE_ENV_FILES
- README: document the env-file input
- test.yaml + fixtures: assert env-file interpolation reaches the CLI

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Sw7j9FYnbChZJbYArxbhuo
@defangdevs
defangdevs requested a review from a team as a code owner July 20, 2026 09:53
@coderabbitai

coderabbitai Bot commented Jul 20, 2026

Copy link
Copy Markdown
Contributor

Warning

Review limit reached

@defangdevs, you've reached your PR review limit, so we couldn't start this review.

Next review available in: 59 minutes

Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available.
You're only billed for reviews past your plan's rate limits ($0.25/file).

How can I continue?

After more reviews become available, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews.

How do review limits work?

CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability.

For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window.

Please refer docs for additional details.

Review details
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: a1fc15fa-c15d-4f3a-ab46-fc371e861826

📥 Commits

Reviewing files that changed from the base of the PR and between 310e286 and 5d53885.

📒 Files selected for processing (5)
  • .github/workflows/test.yaml
  • README.md
  • action.yaml
  • test/action.env
  • test/compose.envfile.yaml
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant