Skip to content

Commit 55cb73d

Browse files
committed
📄 Add documentation for the GitHub Action
1 parent 6b3b05a commit 55cb73d

1 file changed

Lines changed: 75 additions & 1 deletion

File tree

‎README.md‎

Lines changed: 75 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1,75 @@
1-
# localstack-github-actions-login
1+
# LocalStack GitHub Actions Login
2+
3+
[![Test LocalStack GitHub Actions Login](https://github.com/HarshCasper/localstack-github-actions-login/actions/workflows/test.yml/badge.svg)](https://github.com/HarshCasper/localstack-github-actions-login/actions/workflows/test.yml)
4+
[![tag badge](https://img.shields.io/github/v/tag/HarshCasper/localstack-github-actions-login)](https://github.com/HarshCasper/localstack-github-actions-login/tags)
5+
[![license badge](https://img.shields.io/github/license/HarshCasper/localstack-github-actions-login)](./LICENSE)
6+
[![size badge](https://img.shields.io/github/size/HarshCasper/localstack-github-actions-login/dist/index.js)](./dist)
7+
8+
A GitHub Action to log-in into your [LocalStack account](https://app.localstack.cloud) on your GitHub Actions runner workflow by specifying your Email Address and Password. See the [LocalStack Documentation](https://docs.localstack.cloud/references/localstack-cli-manual/#login) for an explanation of a log in using `localstack`CLI, which this action wraps.
9+
10+
## Usage
11+
12+
To get started, you can use this minimal example:
13+
14+
```yaml
15+
- name: 🤔 Login to LocalStack
16+
uses: HarshCasper/localstack-github-actions-login@v0.1.0
17+
with:
18+
email: ${{ secrets.LOCALSTACK_USERNAME }}
19+
password: ${{ secrets.LOCALSTACK_PASSWORD }}
20+
```
21+
22+
### Inputs
23+
24+
| Input | Description | Default |
25+
| ---------- | -------------------------------------------------------------------- | ------- |
26+
| `email` | Email address with which you have configured your LocalStack account | None |
27+
| `password` | Password with which you authenticate your LocalStack account | None |
28+
29+
### Example Workflow
30+
31+
This example workflow will pull the latest version of [LocalStack Pro](https://hub.docker.com/r/localstack/localstack-pro) image with an API key configured in the `LOCALSTACK_API_KEY` secret. It will then pull a log-in using the `LOCALSTACK_USERNAME` and `LOCALSTACK_PASSWORD` secrets. Finally, it will pull a [Cloud Pod](https://docs.localstack.cloud/user-guide/tools/cloud-pods/) available in your [LocalStack account](https://app.localstack.cloud).
32+
33+
```yaml
34+
name: 'Test your AWS infrastructure with LocalStack'
35+
36+
on: [ push, pull_request ]
37+
38+
jobs:
39+
test:
40+
name: 🌐 Pull a Cloud Pod
41+
runs-on: ubuntu-latest
42+
steps:
43+
- name: ⚡️ Checkout the repository
44+
uses: actions/checkout@v3
45+
46+
- name: ☁️ Start LocalStack
47+
run: |
48+
pip install pyopenssl -U
49+
docker pull localstack/localstack-pro:1.4
50+
pip install localstack
51+
DNS_ADDRESS=0 localstack start -d
52+
localstack wait -t 30
53+
pip install awscli-local[ver1]
54+
env:
55+
LOCALSTACK_API_KEY: ${{ secrets.LOCALSTACK_API_KEY }}
56+
57+
- name: 🤔 Login to LocalStack
58+
uses: HarshCasper/localstack-github-actions-login@v0.1.0
59+
with:
60+
email: ${{ secrets.LOCALSTACK_USERNAME }}
61+
password: ${{ secrets.LOCALSTACK_PASSWORD }}
62+
63+
- name: 🤩 Pull a Cloud Pod
64+
run: |
65+
localstack pod load <pod-name> # Add the name of the Cloud Pod you want to pull
66+
localstack pod list
67+
68+
- name: Run our tests
69+
run: |
70+
awslocal ... # Do your testing here
71+
```
72+
73+
## License
74+
75+
[Apache License 2.0](./LICENSE)

0 commit comments

Comments
 (0)