This repo contains an action for deploying containers to AWS. It will build a docker image from a Dockerfile
in the repo, push the image to Amazon ECR and the run the container via AWS AppRunner.
The repo also contains a CLI tool to setup the GitHub workflow in your repo and also setup the AWS IAM role necessary for GitHub Actions to assume via OpenID Connect.
To setup your application for quinntainers, run the following from within your application directory.
npx quinntainer init
This tool was inspired by a tweet from Corey Quinn following his experiences with Google Cloud Run. He's right - for his use case, Google Cloud Run is much easier. Therefore, the only appropriate solution is to create the 18th
way to run containers on AWS 🚀
name: Deploy
on:
push:
branches:
- main
permissions:
id-token: write
contents: read
jobs:
deploy:
concurrency: deploy
runs-on: ubuntu-latest
steps:
- uses: nektos/quinntainer@v1
with:
aws-region: us-west-2
role-to-assume: arn:aws:iam::0123456789:role/quinntainer-gha-myorg-myrepo
port: 80
The actions supports the following inputs:
Input | Description |
---|---|
aws-region |
AWS Region, e.g. us-east-2 |
role-to-assume |
ARN of IAM Role to assume via GHA OIDC |
port |
Port listening in container |
cpu |
CPU to allocate to container (Default: 1024 ) |
memory |
Memory to allocate to container (Default: 2048 ) |
docker-build-context |
Path to docker build context (Default: . ) |
dockerfile |
Path to Dockerfile (Default: Dockerfile ) |