This action relies on provided AWS role or credentials, builds and pushes the docker image to the ECR repo.
# These permissions are needed to interact with GitHub's OIDC
# Token endpoint. Don't need them if you use credentials instead.
permissions:
id-token: write
contents: read
steps:
- uses: actions/checkout@v2 # needed if Dockerfile within the repo
- uses: gameanalytics/github/actions/build-push-ecr@v0
with:
aws-role-to-assume: arn:aws:iam::123456789012:role/my-gh-repo-role
aws-region: us-east-1
ecr-repo: <DEFAULTS TO CURRENT REPO NAME>
ecr-tag: <DEFAULTS TO CURRENT GIT TAG>
docker-build-args: <DEFAULTS TO "-f ./Dockerfile .">
It depends on aws-actions/configure-aws-credentials and aws-actions/amazon-ecr-login. See docs on how to setup credentials in those repos.
It can use only role or credentials, not both. Docs how one can seutp aws role suitable for github actions could be found here.