Skip to content

Commit c61f17c

Browse files
committed
update README [no ci]
1 parent 62d6bbc commit c61f17c

File tree

1 file changed

+39
-1
lines changed

1 file changed

+39
-1
lines changed

README.md

Lines changed: 39 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,44 @@ If neither the blue or green environments exist, it will create a new environmen
1414

1515
The action will then optionally swap the CNAMEs of the staging and production environments.
1616

17-
## Inputs
17+
## Inputs/Outputs
1818

1919
See [action.yml](action.yml)
20+
21+
## Usage
22+
23+
See the [example repo](https://github.com/tmshkr/blue-green-beanstalk-example) for an example of how to use this action.
24+
25+
```yaml
26+
name: Example Deploy Workflow
27+
on:
28+
workflow_dispatch:
29+
push:
30+
branches:
31+
- main
32+
- staging
33+
34+
jobs:
35+
deploy:
36+
runs-on: ubuntu-latest
37+
steps:
38+
- name: Checkout
39+
uses: actions/checkout@v4
40+
- name: Generate source bundle
41+
run: echo ${{ github.ref_name }} > ENVIRONMENT && zip -r bundle.zip . -x '*.git*'
42+
- name: Deploy
43+
uses: tmshkr/blue-green-beanstalk@v1
44+
with:
45+
app_name: "test-app"
46+
aws_access_key_id: ${{ secrets.AWS_ACCESS_KEY_ID }}
47+
aws_region: ${{ vars.AWS_REGION }}
48+
aws_secret_access_key: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
49+
blue_env: "my-blue-env"
50+
green_env: "my-green-env"
51+
platform_branch_name: "Docker running on 64bit Amazon Linux 2023"
52+
production_cname: "your-unique-cname"
53+
source_bundle: "bundle.zip"
54+
swap_cnames: ${{ github.ref_name == 'main' }}
55+
version_description: "Deployed by ${{ github.actor }}"
56+
version_label: ${{ github.ref_name }}-${{ github.sha }}
57+
```

0 commit comments

Comments
 (0)