diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 3cddcf1..1c6bad6 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -29,7 +29,6 @@ jobs: "image-tag": "3.2.0", "install-awslocal": "true", "configuration": "DEBUG=1", - "use-pro": "true", } env: # intentially left `LOCALSTACK_API_KEY` as env here, to ensure the fallback still works for old version @@ -59,7 +58,6 @@ jobs: "image-tag": "latest", "install-awslocal": "true", "configuration": "DEBUG=1", - "use-pro": "true", } env: LOCALSTACK_AUTH_TOKEN: ${{ secrets.LOCALSTACK_AUTH_TOKEN }} @@ -111,7 +109,6 @@ jobs: "image-tag": "latest", "install-awslocal": "true", "configuration": "DEBUG=1", - "use-pro": "true", "state-name": "${{ needs.cloud-pods-save-test.outputs.pod-name }}", "state-action": "load" } @@ -160,7 +157,6 @@ jobs: "image-tag": "latest", "install-awslocal": "true", "configuration": "DEBUG=1", - "use-pro": "true", } env: LOCALSTACK_AUTH_TOKEN: ${{ secrets.LOCALSTACK_AUTH_TOKEN }} @@ -202,7 +198,6 @@ jobs: "image-tag": "latest", "install-awslocal": "true", "configuration": "DEBUG=1", - "use-pro": "true", "state-name": "local-pods-test", "state-action": "load", "state-backend": "local", diff --git a/CHANGELOG.md b/CHANGELOG.md new file mode 100644 index 0000000..0b31faf --- /dev/null +++ b/CHANGELOG.md @@ -0,0 +1,12 @@ +# Changelog + +## [0.3.0] + +### Breaking Changes + +- **`use-pro` now defaults to `true`.** The action will use the `localstack/localstack-pro` image by default. Workflows that relied on the community image without setting `use-pro` will now get the Pro image, which requires a `LOCALSTACK_AUTH_TOKEN`. Set `use-pro: 'false'` explicitly if you need the community image. For newer versions of LocalStack these images are equivalent. + +### Deprecated + +- **`use-pro` input will be removed in a future release as we are consolidating our docker images**. + diff --git a/README.md b/README.md index 907ca51..25ef9eb 100644 --- a/README.md +++ b/README.md @@ -18,20 +18,20 @@ A GitHub Action to setup [LocalStack](https://github.com/localstack/localstack) ```yml - name: Start LocalStack - uses: LocalStack/setup-localstack@v0.2.5 + uses: LocalStack/setup-localstack@v0.3.0 with: image-tag: 'latest' install-awslocal: 'true' env: LOCALSTACK_AUTH_TOKEN: ${{ secrets.LOCALSTACK_AUTH_TOKEN }} ``` -> **NOTE**: The `LOCALSTACK_AUTH_TOKEN` environment variable is required to be set if `use-pro` is set to `true`. -If the key is not found LocalStack by default falls back to the CE edition and displays a warning. +> **NOTE**: The `LOCALSTACK_AUTH_TOKEN` environment variable is required. Since `use-pro` now defaults to `true`, the action will use the Pro image by default. +> The `use-pro` input will be removed in a future release. ### Install only CLIs and startup later ```yml - name: Install LocalStack CLIs - uses: LocalStack/setup-localstack@v0.2.5 + uses: LocalStack/setup-localstack@v0.3.0 with: skip-startup: 'true' install-awslocal: 'true' @@ -39,7 +39,7 @@ If the key is not found LocalStack by default falls back to the CE edition and d ... - name: Start LocalStack - uses: LocalStack/setup-localstack@v0.2.5 + uses: LocalStack/setup-localstack@v0.3.0 with: image-tag: 'latest' env: @@ -49,7 +49,7 @@ If the key is not found LocalStack by default falls back to the CE edition and d ### Save a state later on in the pipeline ```yml - name: Save LocalStack State - uses: LocalStack/setup-localstack@v0.2.5 + uses: LocalStack/setup-localstack@v0.3.0 with: install-awslocal: 'true' state-backend: cloud-pods @@ -63,7 +63,7 @@ If the key is not found LocalStack by default falls back to the CE edition and d ### Load an already saved state ```yml - name: Start LocalStack and Load State - uses: LocalStack/setup-localstack@v0.2.5 + uses: LocalStack/setup-localstack@v0.3.0 with: install-awslocal: 'true' state-backend: cloud-pods @@ -78,7 +78,7 @@ If the key is not found LocalStack by default falls back to the CE edition and d ### Manage Application Previews (on an Ephemeral Instance) ```yml -uses: LocalStack/setup-localstack@v0.2.5 +uses: LocalStack/setup-localstack@v0.3.0 with: github-token: ${{ secrets.GITHUB_TOKEN }} state-backend: ephemeral @@ -93,7 +93,7 @@ uses: LocalStack/setup-localstack@v0.2.5 ... with: - uses: LocalStack/setup-localstack@v0.2.5 + uses: LocalStack/setup-localstack@v0.3.0 with: github-token: ${{ secrets.GITHUB_TOKEN }} state-backend: ephemeral @@ -122,7 +122,7 @@ with: | `state-action` | Valid values are `load`, `save`, `start`, `stop`, `''` (empty, don't manage state). Values `start`/`stop` only usable with app previews. | `''` | | `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` | | `state-name` | Name of the state artifact (without extension) | `false` | -| `use-pro` | Whether to use the Pro version of LocalStack (requires Auth Token to be configured) | `false` | +| `use-pro` | Whether to use the Pro version of LocalStack (requires Auth Token to be configured). Will be removed in a future release. | `true` | ## Example workflow ```yml @@ -137,12 +137,11 @@ jobs: - uses: actions/checkout@v3 - name: Start LocalStack - uses: LocalStack/setup-localstack@v0.2.5 + uses: LocalStack/setup-localstack@v0.3.0 with: image-tag: 'latest' install-awslocal: 'true' configuration: DEBUG=1 - use-pro: 'true' state-backend: cloud-pods state-action: load state-name: my-cloud-pod @@ -156,7 +155,7 @@ jobs: echo "Test Execution complete!" - name: Save LocalStack State - uses: LocalStack/setup-localstack@v0.2.5 + uses: LocalStack/setup-localstack@v0.3.0 with: state-backend: local state-action: save diff --git a/action.yml b/action.yml index e889eee..edff1c5 100644 --- a/action.yml +++ b/action.yml @@ -16,9 +16,10 @@ inputs: required: true default: 'true' use-pro: - description: 'Whether to use LocalStack Pro (requires a valid CI Auth Token)' + description: 'Deprecated. Whether to use LocalStack Pro (requires a valid CI Auth Token)' required: false - default: 'false' + default: 'true' + deprecationMessage: 'use-pro is deprecated and will be removed in a future release. The pro image is now the default.' configuration: description: 'Configuration variables to use for LocalStack' required: false diff --git a/startup/action.yml b/startup/action.yml index 3cc4361..ce39050 100644 --- a/startup/action.yml +++ b/startup/action.yml @@ -11,9 +11,10 @@ inputs: required: true default: 'true' use-pro: - description: 'Whether to use LocalStack Pro (requires a valid CI Auth Token)' + description: 'Deprecated. Whether to use LocalStack Pro (requires a valid CI Auth Token)' required: false - default: 'false' + default: 'true' + deprecationMessage: 'use-pro is deprecated and will be removed in a future release. The pro image is now the default.' configuration: description: 'Configuration variables to use for LocalStack' required: false @@ -62,7 +63,10 @@ runs: - name: Start LocalStack run: | if [ "$USE_PRO" = true ]; then - if [ "x$LOCALSTACK_AUTH_TOKEN" = "x" -o "x$LOCALSTACK_API_KEY" = "x" ]; then + if [ "x$LOCALSTACK_API_KEY" != "x" ]; then + echo "WARNING: LOCALSTACK_API_KEY is deprecated, please use LOCALSTACK_AUTH_TOKEN instead." + fi + if [ "x$LOCALSTACK_AUTH_TOKEN" = "x" -a "x$LOCALSTACK_API_KEY" = "x" ]; then echo "WARNING: LocalStack Auth Token not detected, please verify your configuration..." fi CONFIGURATION="DNS_ADDRESS=127.0.0.1 ${CONFIGURATION}"