https://github.com/moneymeets/action-beanstalk-deploy
GitHub action for AWS Elastic Beanstalk deployment
https://github.com/moneymeets/action-beanstalk-deploy
Last synced: 6 months ago
JSON representation
GitHub action for AWS Elastic Beanstalk deployment
- Host: GitHub
- URL: https://github.com/moneymeets/action-beanstalk-deploy
- Owner: moneymeets
- Created: 2021-02-10T16:46:30.000Z (over 4 years ago)
- Default Branch: master
- Last Pushed: 2025-04-02T06:50:21.000Z (6 months ago)
- Last Synced: 2025-04-24T10:49:01.139Z (6 months ago)
- Language: Python
- Homepage:
- Size: 152 KB
- Stars: 1
- Watchers: 4
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Codeowners: .github/CODEOWNERS
Awesome Lists containing this project
README
# action-beanstalk-deploy
GitHub action for AWS Elastic Beanstalk deployment
# Introduction
This action creates or reuses a Beanstalk application version and triggers the environment update.
## Prerequisites
* existing docker image in your docker registry
* docker-compose.yml with `${IMAGE_TAG}` variable as tag
* optional: directory with custom platform hooks## Platform hooks
You can provide custom platform hooks, by specifying the `platform_hooks_path` key.
Example of the directory structure:```
.ebextensions/
config.config
.platform/
hooks/
prebuild/
mount.sh
...
```For more detailed information about platform hooks, see: https://docs.aws.amazon.com/elasticbeanstalk/latest/dg/platforms-linux-extend.html
# Usage
See [action.yml](action.yml).
Basic (with default values):
```yaml
steps:
- name: Deploy
uses: moneymeets/action-beanstalk-deploy@master
with:
application_name: demo-app
environment_name: "${{ format('demo-app-{0}', github.event.deployment.environment) }}"
platform_hooks_path: "${{ github.workspace }}/beanstalk-platform-hooks"
env:
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
```With full list of parameters:
```yaml
steps:
- name: Deploy
uses: moneymeets/action-beanstalk-deploy@master
with:
application_name: demo-app
docker_compose_path: "${{ github.workspace }}/docker/docker-compose.yml"
environment_name: "${{ format('demo-app-{0}', github.event.deployment.environment) }}"
platform_hooks_path: "${{ github.workspace }}/beanstalk-platform-hooks"
version_label: ${{ github.sha }}
version_description: "GitHub Action #${{ github.run_number }}"
env:
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
AWS_REGION: us-east-1
```# Local testing
Make sure that valid AWS credentials are exported into your profile, or located in `~/.aws/credentials` file.```bash
export APPLICATION_NAME=demo-app
export ENVIRONMENT_NAME=demo-app-dev
export PLATFORM_HOOKS_PATH=beanstalk-platform-hooks
export VERSION_LABEL=SampleVersionLabel
export VERSION_DESCRIPTION=SampleVersionDescription
export DOCKER_COMPOSE_PATH=docker/docker-compose.yml
export PYTHONUNBUFFERED="1"poetry run python action.py
```