{"id":18636662,"url":"https://github.com/localstack/setup-localstack","last_synced_at":"2025-04-11T09:30:58.980Z","repository":{"id":65157760,"uuid":"492239501","full_name":"localstack/setup-localstack","owner":"localstack","description":"Sets up LocalStack CLI in your GitHub Actions workflow ☁️","archived":false,"fork":false,"pushed_at":"2025-02-27T10:41:46.000Z","size":85,"stargazers_count":30,"open_issues_count":4,"forks_count":11,"subscribers_count":17,"default_branch":"main","last_synced_at":"2025-03-25T11:52:18.491Z","etag":null,"topics":["aws","cicd","cloud","localstack","setup-tool"],"latest_commit_sha":null,"homepage":"https://github.com/marketplace/actions/setup-localstack","language":null,"has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/localstack.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2022-05-14T14:30:08.000Z","updated_at":"2025-03-16T18:07:18.000Z","dependencies_parsed_at":"2024-03-15T13:32:16.390Z","dependency_job_id":"ccfc043f-3eb5-494b-bd6f-71ab454e887d","html_url":"https://github.com/localstack/setup-localstack","commit_stats":null,"previous_names":["localstack/setup-localstack","harshcasper/setup-localstack"],"tags_count":7,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/localstack%2Fsetup-localstack","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/localstack%2Fsetup-localstack/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/localstack%2Fsetup-localstack/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/localstack%2Fsetup-localstack/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/localstack","download_url":"https://codeload.github.com/localstack/setup-localstack/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248368206,"owners_count":21092317,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["aws","cicd","cloud","localstack","setup-tool"],"created_at":"2024-11-07T05:31:02.270Z","updated_at":"2025-04-11T09:30:58.727Z","avatar_url":"https://github.com/localstack.png","language":null,"readme":"# Setup LocalStack\n\n[![LocalStack Test](https://github.com/LocalStack/setup-localstack/actions/workflows/ci.yml/badge.svg)](https://github.com/LocalStack/setup-localstack/actions/workflows/ci.yml)\n\n\nA GitHub Action to setup [LocalStack](https://github.com/localstack/localstack) on your GitHub Actions runner workflow by:\n\n- Pulling a specific version of the LocalStack Docker Image into the GitHub Action runner.\n- Configuring the [LocalStack CLI](https://docs.localstack.cloud/get-started/#localstack-cli) to launch the Docker container with an optional API token for pro usage.\n- 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.\n- Export/import [LocalStack state](https://docs.localstack.cloud/user-guide/state-management/export-import-state/) as an artifact\n- Save/load [LocalStack Cloud Pods](https://docs.localstack.cloud/user-guide/state-management/cloud-pods/)\n- Start/stop a [LocalStack Ephemeral Instance](https://docs.localstack.cloud/user-guide/cloud-sandbox/ephemeral-instance/) _(PREVIEW)_\n\n## Usage\n\n### Get started with a minimal example\n\n```yml\n- name: Start LocalStack\n  uses: LocalStack/setup-localstack@v0.2.3\n  with:\n    image-tag: 'latest'\n    install-awslocal: 'true'\n  env:\n    LOCALSTACK_API_KEY: ${{ secrets.LOCALSTACK_API_KEY }}\n```\n\u003e **NOTE**: The `LOCALSTACK_API_KEY` environment variable is required to be set if `use-pro` is set to `true`.  \nIf the key is not found LocalStack by default falls back to the CE edition and displays a warning.\n\n### Install only CLIs and startup later\n```yml\n- name: Install LocalStack CLIs\n  uses: LocalStack/setup-localstack@v0.2.3\n  with:\n    skip-startup: 'true'\n    install-awslocal: 'true'\n\n...\n\n- name: Start LocalStack\n  uses: LocalStack/setup-localstack@v0.2.3\n  with:\n    image-tag: 'latest'\n  env:\n    LOCALSTACK_API_KEY: ${{ secrets.LOCALSTACK_API_KEY }}\n```\n\n### Save a state later on in the pipeline\n```yml\n- name: Save LocalStack State\n  uses: LocalStack/setup-localstack@v0.2.3\n  with:\n    install-awslocal: 'true'\n    state-backend: cloud-pods\n    state-action: save\n    state-name: my-cloud-pod\n  env:\n    LOCALSTACK_API_KEY: ${{ secrets.LOCALSTACK_API_KEY }}\n```\n\u003e **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.\n\n### Load an already saved state\n```yml\n- name: Start LocalStack and Load State\n  uses: LocalStack/setup-localstack@v0.2.3\n  with:\n    install-awslocal: 'true'\n    state-backend: cloud-pods\n    state-action: load\n    state-name: my-cloud-pod\n  env:\n    LOCALSTACK_API_KEY: ${{ secrets.LOCALSTACK_API_KEY }}\n```\n\u003e **NOTE**: To load a **local state** from a different GitHub Actions workflow, one must set the `WORKFLOW_ID` environment variable.\n\n\u003e **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.\n\n### Manage Application Previews (on an Ephemeral Instance)\n```yml\nuses: LocalStack/setup-localstack@v0.2.3\n  with:\n      github-token: ${{ secrets.GITHUB_TOKEN }}\n      state-backend: ephemeral\n      state-action: start\n      # Adding this option prevents Ephemeral Instance to be stopped after the `preview-cmd` run\n      skip-ephemeral-stop: 'true'\n      # Optional script/command to run\n      preview-cmd: deploy.sh\n  env:\n    LOCALSTACK_API_KEY: ${{ secrets.LOCALSTACK_API_KEY }}\n\n...\n\nwith:\n  uses: LocalStack/setup-localstack@v0.2.3\n  with:\n      github-token: ${{ secrets.GITHUB_TOKEN }}\n      state-backend: ephemeral\n      state-action: stop\n  env:\n    LOCALSTACK_API_KEY: ${{ secrets.LOCALSTACK_API_KEY }}\n```\n\n## Inputs\n\n| Input              | Description                                                                      | Default  |\n| ------------------ | -------------------------------------------------------------------------------- | -------- |\n| `auto-load-pod`    | Which pod to load on startup of LocalStack  (application preview)                | `None`   |\n| `ci-project`          | Name of the CI project to track in LocalStack Cloud |  |\n| `configuration`    | Configuration variables to use while starting LocalStack container               | `None`   |\n| `extension-auto-install` | Which extensions to install on startup of LocalStack (application preview) | `None`   | \n| `github-token`          | Github token used to create PR comments |  |\n| `image-tag`        | Tag of the LocalStack Docker image to use                                        | `latest` |\n| `include-preview`          | Whether to include the created Ephemeral Instance URL in the PR comment | `false` |\n| `install-awslocal` | Whether to install the `awslocal` CLI into the build environment                 | `true`   |\n| `lifetime`         | How long an ephemeral instance should live                                       | 30       |\n| `preview-cmd`          | Command(s) used to create a Ephemeral Instance of the PR (can use `$AWS_ENDPOINT_URL`) |  |\n| `skip-ephemeral-stop`        | Skip stopping LocalStack Ephemeral Instance | `false`  |\n| `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`  |\n| `skip-wait`        | Skip waiting for LocalStack to start up | `false`  |\n| `state-action`     | Valid values are `load`, `save`, `start`, `stop`, `` (empty, don't manage state). Values `start`/`stop` only usable with app previews.  | `` |\n| `state-backend`    | Either store the state of LocalStack locally, as a Cloud Pod or start an Ephemeral Instance. Valid values are `cloud-pods`, `ephemeral` or `local`. Use this option in unison with `state-action` to control behaviour. | `cloud-pods`  |\n| `state-name`       | Name of the state artifact (without extension) | `false`  |\n| `use-pro`          | Whether to use the Pro version of LocalStack (requires API key to be configured) | `false`  |\n\n## Example workflow\n```yml\nname: LocalStack Test\non: [ push, pull_request ]\n\njobs:\n  localstack-action-test:\n    name: 'Test LocalStack GitHub Action'\n    runs-on: ubuntu-latest\n    steps:\n      - uses: actions/checkout@v3\n\n      - name: Start LocalStack\n        uses: LocalStack/setup-localstack@v0.2.3\n        with:\n          image-tag: 'latest'\n          install-awslocal: 'true'\n          configuration: DEBUG=1\n          use-pro: 'true'\n          state-backend: cloud-pods\n          state-action: load\n          state-name: my-cloud-pod\n        env:\n          LOCALSTACK_API_KEY: ${{ secrets.LOCALSTACK_API_KEY }}\n\n      - name: Run Tests against LocalStack\n        run: |\n          awslocal s3 mb s3://test\n          awslocal s3 ls\n          echo \"Test Execution complete!\"\n\n      - name: Save LocalStack State\n        uses: LocalStack/setup-localstack@v0.2.3\n        with:\n          state-backend: local\n          state-action: save\n          state-name: my-ls-state-artifact\n        env:\n          LOCALSTACK_API_KEY: ${{ secrets.LOCALSTACK_API_KEY }}\n          WORKFLOW_ID: ${{ env.MY_GOLDEN_LS_STATE }}\n```\n\n## License\n\n[MIT License](LICENSE)\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flocalstack%2Fsetup-localstack","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Flocalstack%2Fsetup-localstack","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flocalstack%2Fsetup-localstack/lists"}