{"id":31692484,"url":"https://github.com/nandemo-ya/kecs-action","last_synced_at":"2026-04-11T11:33:22.627Z","repository":{"id":318243031,"uuid":"1070007098","full_name":"nandemo-ya/kecs-action","owner":"nandemo-ya","description":"GitHub Action for setting up KECS (Kubernetes-based ECS Compatible Service) in CI/CD workflows","archived":false,"fork":false,"pushed_at":"2025-10-06T01:38:23.000Z","size":35,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2025-10-06T03:16:32.636Z","etag":null,"topics":["aws","ci-cd","docker","ecs","fargate","github-actions","kecs","kubernetes","localstack","testing"],"latest_commit_sha":null,"homepage":"https://github.com/marketplace/actions/setup-kecs","language":"Shell","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/nandemo-ya.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2025-10-05T04:17:46.000Z","updated_at":"2025-10-06T01:38:26.000Z","dependencies_parsed_at":"2025-10-06T03:16:42.736Z","dependency_job_id":"c43e2072-43b9-4622-9a28-e491e1db9019","html_url":"https://github.com/nandemo-ya/kecs-action","commit_stats":null,"previous_names":["nandemo-ya/kecs-action"],"tags_count":2,"template":false,"template_full_name":null,"purl":"pkg:github/nandemo-ya/kecs-action","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nandemo-ya%2Fkecs-action","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nandemo-ya%2Fkecs-action/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nandemo-ya%2Fkecs-action/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nandemo-ya%2Fkecs-action/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/nandemo-ya","download_url":"https://codeload.github.com/nandemo-ya/kecs-action/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nandemo-ya%2Fkecs-action/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":278963832,"owners_count":26076542,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-10-08T02:00:06.501Z","response_time":56,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["aws","ci-cd","docker","ecs","fargate","github-actions","kecs","kubernetes","localstack","testing"],"created_at":"2025-10-08T14:53:29.139Z","updated_at":"2025-10-08T14:53:32.471Z","avatar_url":"https://github.com/nandemo-ya.png","language":"Shell","funding_links":[],"categories":[],"sub_categories":[],"readme":"# KECS Action\n\n[![Test Setup](https://github.com/nandemo-ya/kecs-action/actions/workflows/test-setup.yml/badge.svg)](https://github.com/nandemo-ya/kecs-action/actions/workflows/test-setup.yml)\n[![E2E Tests](https://github.com/nandemo-ya/kecs-action/actions/workflows/test-e2e.yml/badge.svg)](https://github.com/nandemo-ya/kecs-action/actions/workflows/test-e2e.yml)\n[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)\n\nGitHub Action for setting up KECS (Kubernetes-based ECS Compatible Service) in your CI/CD workflows.\n\n## Overview\n\nThis action simplifies the setup of KECS for testing ECS workflows in GitHub Actions. It handles installation, cluster creation, and environment configuration automatically.\n\n## Features\n\n- 🚀 **Quick Setup**: Get KECS running in just a few lines\n- 🔧 **Auto-configured**: Automatically sets up environment variables and kubeconfig\n- 🧹 **Auto Cleanup**: Companion cleanup action ensures resources are properly deleted\n- 🏗️ **Multi-platform**: Supports both amd64 and arm64 architectures\n- 📦 **No k3d Required**: KECS embeds k3d SDK v5.8.3 internally\n\n## Quick Start\n\n### Basic Usage\n\n```yaml\nname: ECS Workflow Test\n\non: [push]\n\njobs:\n  test:\n    runs-on: ubuntu-latest\n    steps:\n      - uses: actions/checkout@v4\n\n      - name: Setup KECS\n        uses: nandemo-ya/kecs-action@v1\n        id: kecs\n\n      - name: Run ECS Tests\n        run: |\n          # KECS is ready, AWS_ENDPOINT_URL is automatically set\n          aws ecs create-cluster --cluster-name test\n          aws ecs list-clusters\n\n      - name: Cleanup KECS\n        if: always()\n        uses: nandemo-ya/kecs-action/cleanup@v1\n        with:\n          instance-name: ${{ steps.kecs.outputs.instance-name }}\n```\n\n## Inputs\n\n| Input | Description | Required | Default |\n|-------|-------------|----------|---------|\n| `kecs-version` | KECS version to install | No | `latest` |\n| `instance-name` | KECS instance name | No | Auto-generated |\n| `api-port` | AWS API port | No | `5373` |\n| `admin-port` | Admin API port | No | `5374` |\n| `additional-localstack-services` | Additional LocalStack services (comma-separated) | No | `\"\"` |\n| `timeout` | Timeout for cluster creation | No | `10m` |\n| `debug` | Enable debug logging | No | `false` |\n\n## Outputs\n\n| Output | Description |\n|--------|-------------|\n| `instance-name` | Actual KECS instance name |\n| `endpoint` | KECS API endpoint URL |\n| `admin-endpoint` | KECS admin endpoint URL |\n| `kubeconfig` | Path to kubeconfig file |\n\n## Environment Variables\n\nThe action automatically exports the following environment variables:\n\n- `AWS_ENDPOINT_URL`: KECS API endpoint (for AWS CLI)\n- `KUBECONFIG`: Path to kubeconfig file (for kubectl access)\n\nFor direct API access to KECS, use the `endpoint` output: `${{ steps.kecs.outputs.endpoint }}`\n\n## Advanced Usage\n\n### With Additional LocalStack Services\n\n```yaml\n- name: Setup KECS with S3 and DynamoDB\n  uses: nandemo-ya/kecs-action@v1\n  with:\n    additional-localstack-services: s3,dynamodb,sqs\n```\n\n### With Custom Instance Name\n\n```yaml\n- name: Setup KECS\n  uses: nandemo-ya/kecs-action@v1\n  with:\n    instance-name: my-test-instance\n```\n\n### With Port-forward (Optional)\n\n```yaml\n- name: Setup KECS\n  uses: nandemo-ya/kecs-action@v1\n  id: kecs\n\n- name: Setup Port Forward\n  run: |\n    # Port-forward agent starts automatically\n    kecs port-forward start service default/my-service --local-port 8080\n\n- name: Test via Port Forward\n  run: |\n    curl http://localhost:8080/health\n```\n\n## Cleanup Action\n\nAlways use the cleanup action to ensure resources are properly deleted:\n\n```yaml\n- name: Cleanup KECS\n  if: always()\n  uses: nandemo-ya/kecs-action/cleanup@v1\n  with:\n    instance-name: ${{ steps.kecs.outputs.instance-name }}\n    collect-logs: 'true'  # Optional, default: false\n    log-directory: '.kecs-logs'  # Optional, default: .kecs-logs\n```\n\n### Cleanup Inputs\n\n| Input | Description | Required | Default |\n|-------|-------------|----------|---------|\n| `instance-name` | KECS instance name to cleanup | Yes | - |\n| `collect-logs` | Collect logs before cleanup | No | `false` |\n| `log-directory` | Directory to save logs | No | `.kecs-logs` |\n\nWhen `collect-logs` is enabled, the action will:\n- Collect KECS control plane logs\n- Collect LocalStack logs\n- Collect Traefik logs\n- Collect pod statuses and cluster events\n- Upload logs as workflow artifacts (7-day retention)\n\n## How It Works\n\n1. **Install Dependencies**: Installs kubectl and downloads KECS CLI\n2. **Start KECS**: Creates a k3d cluster with KECS control plane (using embedded k3d SDK)\n3. **Verify Setup**: Performs health checks and API tests\n4. **Export Environment**: Sets up environment variables for your tests\n\n## Requirements\n\n- Ubuntu runner (ubuntu-latest recommended)\n- Docker (pre-installed on GitHub Actions runners)\n\n## Troubleshooting\n\n### KECS fails to start\n\nCheck the logs by enabling debug mode:\n\n```yaml\n- name: Setup KECS\n  uses: nandemo-ya/kecs-action@v1\n  with:\n    debug: true\n```\n\n### Port conflicts\n\nSpecify different ports:\n\n```yaml\n- name: Setup KECS\n  uses: nandemo-ya/kecs-action@v1\n  with:\n    api-port: 6000\n    admin-port: 6001\n```\n\n## Examples\n\n### Complete ECS Workflow\n\n```yaml\nname: ECS Deployment Test\n\non: [push]\n\njobs:\n  test:\n    runs-on: ubuntu-latest\n    steps:\n      - uses: actions/checkout@v4\n\n      - name: Setup KECS\n        uses: nandemo-ya/kecs-action@v1\n        id: kecs\n\n      - name: Configure AWS CLI\n        run: |\n          export AWS_ACCESS_KEY_ID=test\n          export AWS_SECRET_ACCESS_KEY=test\n\n      - name: Create ECS cluster\n        run: aws ecs create-cluster --cluster-name my-cluster --region us-east-1\n\n      - name: Register task definition\n        run: |\n          cat \u003e task-def.json \u003c\u003cEOF\n          {\n            \"family\": \"my-app\",\n            \"networkMode\": \"awsvpc\",\n            \"requiresCompatibilities\": [\"FARGATE\"],\n            \"cpu\": \"256\",\n            \"memory\": \"512\",\n            \"containerDefinitions\": [\n              {\n                \"name\": \"app\",\n                \"image\": \"nginx:latest\",\n                \"essential\": true,\n                \"portMappings\": [{\"containerPort\": 80}]\n              }\n            ]\n          }\n          EOF\n          aws ecs register-task-definition --cli-input-json file://task-def.json --region us-east-1\n\n      - name: Create service\n        run: |\n          aws ecs create-service \\\n            --cluster my-cluster \\\n            --service-name my-service \\\n            --task-definition my-app \\\n            --desired-count 1 \\\n            --launch-type FARGATE \\\n            --network-configuration \"awsvpcConfiguration={subnets=[subnet-123],securityGroups=[sg-123]}\" \\\n            --region us-east-1\n\n      - name: Cleanup KECS\n        if: always()\n        uses: nandemo-ya/kecs-action/cleanup@v1\n        with:\n          instance-name: ${{ steps.kecs.outputs.instance-name }}\n```\n\n## License\n\nMIT License - see [LICENSE](LICENSE) file for details\n\n## Related Projects\n\n- [KECS](https://github.com/nandemo-ya/kecs) - Kubernetes-based ECS Compatible Service\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnandemo-ya%2Fkecs-action","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fnandemo-ya%2Fkecs-action","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnandemo-ya%2Fkecs-action/lists"}