Skip to content

[Architecture] Github Action: Add Eco-Infra Action #44

@CodingLady22

Description

@CodingLady22

Description

Integrate eco-infra-action to monitor and report carbon emissions from our cloud infrastructure. This supports our climate mission by providing visibility into our own environmental impact and demonstrating best practices for sustainable development.

Goal: Integrate Eco-Infra Action to monitor the carbon footprint of infrastructure.
Use Case: We want to measure the sustainability impact of our deployments (e.g., preview environments, cloud builds) by using this action to help us ensure our dev workflows align with sustainable practices.

Directory: .github/workflows/ - Create a new file, preferably named 'ecoinfra-analysis.yml'

Implementation Instructions (for Copilot)

  • Generate a GitHub Actions workflow file that integrates Eco Infra Action to monitor infrastructure emissions.
Create a GitHub Actions workflow file that uses the Eco Infra Action to analyze and report CO2 emissions from Terraform infrastructure. The workflow should:  
1. Run on every push to the `main` branch.  
2. Use the `ecoinfra/[email protected]` action.  
3. Require inputs:  
   - `token` (API token from Eco Infra dashboard)  
   - `project-name` (e.g., "map-dashboard")  
   - `path` (e.g., "./terraform")  
   - `apply: "true"`  
4. Store the token as a GitHub secret named `ECOINFRA_TOKEN`.  

Note:

  • Add your Eco Infra API token as a GitHub secret named ECOINFRA_TOKEN
  • Confirm the folder paths are correct (default: ./terraform)
  • The apply: "true" setting enables the action to analyze the infrastructure changes

Acceptance Criteria

  • Action is properly configured
  • Workflow runs successfully

Metadata

Metadata

Labels

No labels
No labels

Type

No type

Projects

Status

No status

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions