turnerlabs / fargate-cicd-action

A Github Action for doing CI/CD with fargate-cicd (Docker + AWS Fargate)

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

fargate-cicd-action

A Github Action for doing CI/CD with fargate-cicd (Docker + AWS Fargate)

This action runs commands with shell expansion in a fargate-cicd build container.

Example usage

- name: Login to ECR
  uses: turnerlabs/fargate-cicd-action@master
  env:
    AWS_DEFAULT_REGION: us-east-1
    AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
    AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
  with:
    args: login=$(aws ecr get-login --no-include-email) && eval "$login"

- name: Push image to ECR
  uses: turnerlabs/fargate-cicd-action@master
  with:
    args: docker push $IMAGE
    
- name: Deploy image to fargate
  uses: turnerlabs/fargate-cicd-action@master
  env:
    AWS_DEFAULT_REGION: us-east-1
    AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
    AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
    FARGATE_CLUSTER: myapp-dev
    FARGATE_SERVICE: myapp-dev
  with:
    args: fargate service deploy -i $IMAGE

See cicd.yml for full CI/CD example.

About

A Github Action for doing CI/CD with fargate-cicd (Docker + AWS Fargate)

License:Apache License 2.0


Languages

Language:Dockerfile 82.6%Language:Shell 17.4%