Deploy an application in AWS that uses docker and cloud formation.
Create an AWS ECR Repository. Create an AWS Access credentials.
Name of the environment to deploy.
with:
ENVIRONMENT: testing
AWS cloud-formation stack name.
with:
AWS_CF_STACK_NAME: ${{ github.event.repository.name }}
INFO: Recommend send the repository name.
AWS ECR Repository name.
with:
AWS_ECR_REPOSITORY: 'test-repository-name'
AWS Access Key ID.
with:
AWS_ACCESS_KEY_ID: AKIA*****BUT
AWS Secret Access Key.
with:
AWS_SECRET_ACCESS_KEY: yWFX**********aC2sCc
AWS Region.
with:
AWS_REGION: us-east-2
Bucket name to store cloudformation.yml files
with:
AWS_BUCKET_CLOUDFORMATION: 'test-bucket-cf'
The comma-delimited list of stack template capabilities to acknowledge. Defaults to 'CAPABILITY_IAM'.
with:
CAPABILITIES: CAPABILITY_IAM,CAPABILITY_NAMED_IAM
Cloudformation parameters to override when deploy the application.
with:
AWS_CLOUDFORMATION_PARAMS_OVERRIDE: >-
'PARAMETER_1=value 1,'
'PARAMETER_2=value 2,'
'PARAMETER_3=value 3'
INFO: Always replace the following parameters:
1.Environment
: The environment sended in the inputs.
2.ParameterSuffix
: The environment but capitalized.
3.EnvAwsECRImage
: The docker image upload to AWS ECR.
Tag that will be placed on the docker image to upload in ECR. The default value is the Short commit SHA.
with:
TAG: '1.0.0'
Disable docker cache. By default is enabled.
Default value
: false
with:
DISABLE_CACHE: false
Concatenate the environment in the cloudformation stack name at the end. By default is true
.
Default value
: true
with:
CONCAT_ENV_CF_STACK_NAME: true
If is true
replace version in package json with the tag sended or the Short commit SHA. By default is true
.
Default value
: true
with:
REPLACE_VERSION_IN_PACKAGE_JSON: true
name: SomeWorkflow
on: [push]
jobs:
build:
name: Build
runs-on: ubuntu-latest
steps:
- id: string
uses: steplix/cicd-steplix-deploy-ecr-and-cloudformation@v1
with:
ENVIRONMENT: testing
COMMIT_MESSAGE: ${{ github.event.head_commit.message }}
AWS_ECR_REPOSITORY: ${{ github.event.repository.name }}
AWS_ACCESS_KEY_ID: AKIA*****BUT
AWS_SECRET_ACCESS_KEY: yWFX**********aC2sCc
AWS_REGION: us-east-2