Here are shared GitHub Action actions and workflows that can be used for build and deploy!
This is a major update to platform-actions with several breaking changes.
-
Rename workflow:
deployment.all-environments.ymltodeployment.all-environments-ecs.yml. -
Remove
applicationsparameter from all platform-actions workflows. -
For
package.docker.yml, if using parameterrepo-name, change it toecr-repo-name. -
Use tag
@v2for allnsbno/platform-actionsworkflows (Quick tip: do a global search for.yml@v1or.yml@mainand replace with.yml@v2 -
Remove
package.s3-static-files.ymland replace withpackage.s3.ymlwithartifact-path: "build/client"
If your deployment target is ECS, use the latest 3.x version of terraform-aws-ecs-service
- Use the latest data source vy_ecs_image
- How to: https://github.com/nsbno/terraform-aws-ecs-service/releases/tag/3.0.0
If your deployment target is Lambda, use the latest 2.x version of terraform-aws-lambda
- Use the latest data source vy_lambda_artifact
- How to: https://github.com/nsbno/terraform-aws-lambda/releases/tag/2.0.0
Please refer to the release page for the latest release notes.
Workflows are defined in .github/workflows/ and can be used to automate tasks such as building, testing, packaging, and deploying code.
These are helper workflows that can be used to simplify other workflows. Examples include workflows for finding changes in Terraform or running Terraform plan.
Workflows prefixed with build and test are meant to simplify the process of building and testing code.
Workflows prefixed with package are meant to simplify the process of packaging code. Packaging workflows depend on build and test workflows, so they should be run after those workflows.
Packaging in pull requests need to use actions/checkout with the PR head commit sha.
This way, the correct tag will exist for the deploy stage.
In pull requests, the default Git sha being used is a temporary merge commit sha (e.g. in for actions/checkout).
In workflows meant to be run in pull requests, we want to use the head commit sha of the pull request instead.
Examples include, building in node for static files, deployments of branches and running Terraform plan.