Skip to content

Commit

Permalink
update README for upcoming release (#32)
Browse files Browse the repository at this point in the history
  • Loading branch information
lukqw authored Jul 17, 2024
1 parent 4ae40bc commit 7bc0b19
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 10 deletions.
8 changes: 2 additions & 6 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -1,9 +1,5 @@
name: LocalStack Test
on:
push:
paths-ignore:
- ./*.md
- LICENSE
pull_request:
paths-ignore:
- ./*.md
Expand Down Expand Up @@ -137,10 +133,10 @@ jobs:

- name: Run AWS Commands
run: |
awslocal s3 rb s3://test
awslocal s3 mb s3://test
awslocal sqs delete-queue --queue-url $(awslocal sqs get-queue-url --queue-name test-queue --output text)
awslocal s3 rb s3://test
awslocal sqs create-queue --queue-name test-queue
awslocal sqs delete-queue --queue-url $(awslocal sqs get-queue-url --queue-name test-queue --output text)
- name: Save the State Artifact
uses: jenseng/dynamic-uses@v1
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/ephemeral.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ jobs:
"skip-ephemeral-stop": "true",
"preview-cmd": ${{ toJSON(env.PREVIEW_CMD) }},
"lifetime": 5,
"extension-auto-install": "localstack-extension-mailhog",
}
env:
LOCALSTACK_API_KEY: ${{ secrets.LOCALSTACK_API_KEY }}
Expand All @@ -29,7 +30,6 @@ jobs:
awslocal s3 mb s3://test-bucket
awslocal sqs create-queue --queue-name=test-queue
echo "Deploy is done."
EXTENSION_AUTO_INSTALL: "localstack-extension-mailhog"
- name: Assertion step
run: |
Expand Down
7 changes: 5 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ A GitHub Action to setup [LocalStack](https://github.com/localstack/localstack)
- Installing [LocalStack AWS CLI](https://github.com/localstack/awscli-local), a thin wrapper around the `aws` command line interface for use with LocalStack to run integration tests over AWS services.
- Export/import [LocalStack state](https://docs.localstack.cloud/user-guide/state-management/export-import-state/) as an artifact
- Save/load [LocalStack Cloud Pods](https://docs.localstack.cloud/user-guide/state-management/cloud-pods/)
- Start/stop a [LocalStack Ephemeral Instance](https://docs.localstack.cloud/user-guide/cloud-sandbox/application-previews/) _(EXPERIMENTAL)_
- Start/stop a [LocalStack Ephemeral Instance](https://docs.localstack.cloud/user-guide/cloud-sandbox/ephemeral-instance/) _(PREVIEW)_

## Usage

Expand Down Expand Up @@ -76,7 +76,7 @@ If the key is not found LocalStack by default falls back to the CE edition and d

> **NOTE**: The `LOCALSTACK_API_KEY` environment variable is required to be set to **save/load** LocalStack's state either as a Cloud Pod or as a file artifact.

### Manage App Preview (Ephemeral Instance)
### Manage Application Previews (on an Ephemeral Instance)
```yml
uses: LocalStack/setup-localstack@$v0.2.0
with:
Expand Down Expand Up @@ -106,12 +106,15 @@ with:
| Input | Description | Default |
| ------------------ | -------------------------------------------------------------------------------- | -------- |
| `auto-load-pod` | Which pod to load on startup of LocalStack (application preview) | `None` |
| `ci-project` | Name of the CI project to track in LocalStack Cloud | |
| `configuration` | Configuration variables to use while starting LocalStack container | `None` |
| `extension-auto-install` | Which extensions to install on startup of LocalStack (application preview) | `None` |
| `github-token` | Github token used to create PR comments | |
| `image-tag` | Tag of the LocalStack Docker image to use | `latest` |
| `include-preview` | Whether to include the created Ephemeral Instance URL in the PR comment | `false` |
| `install-awslocal` | Whether to install the `awslocal` CLI into the build environment | `true` |
| `lifetime` | How long an ephemeral instance should live | 30 |
| `preview-cmd` | Command(s) used to create a Ephemeral Instance of the PR (can use `$AWS_ENDPOINT_URL`) | |
| `skip-ephemeral-stop` | Skip stopping LocalStack Ephemeral Instance | `false` |
| `skip-startup` | Explicitly prevent LocalStack start up, only installs CLI(s). Recommended to manage state later on in the pipeline or start up an ephemeral instance. | `false` |
Expand Down
4 changes: 3 additions & 1 deletion action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -133,7 +133,9 @@ runs:
{
"github-token": ${{ toJSON(inputs.github-token) }},
"preview-cmd": ${{ toJSON(inputs.preview-cmd) }},
"auto-load-pod": ${{ toJSON(inputs.state-name) }}
"extension-auto-install": ${{ toJSON(inputs.extension-auto-install )}},
"auto-load-pod": ${{ toJSON(inputs.auto-load-pod) }},
"lifetime": ${{ toJSON(inputs.lifetime )}}
}
# Use different artifact from current workflow's by passing the workflow's id as WORKFLOW_ID env variable
Expand Down

0 comments on commit 7bc0b19

Please sign in to comment.