amplify-cli-action
amplify-cli-action copied to clipboard
Error on using the action
The following error is thrown using the action. I was unable to configure amplify in CI for my project.
The error:
/usr/bin/docker run --name ghcrioambientlightamplifycliactionamplifycliaction030_bf109c --label 9916a7 --workdir /github/workspace --rm -e AWS_ACCESS_KEY_ID -e AWS_SECRET_ACCESS_KEY -e AWS_REGION -e INPUT_AMPLIFY_COMMAND -e INPUT_AMPLIFY_ENV -e INPUT_PROJECT_DIR -e INPUT_SOURCE_DIR -e INPUT_DISTRIBUTION_DIR -e INPUT_BUILD_COMMAND -e INPUT_AMPLIFY_CLI_VERSION -e INPUT_DELETE_LOCK -e INPUT_AMPLIFY_ARGUMENTS -e HOME -e GITHUB_JOB -e GITHUB_REF -e GITHUB_SHA -e GITHUB_REPOSITORY -e GITHUB_REPOSITORY_OWNER -e GITHUB_RUN_ID -e GITHUB_RUN_NUMBER -e GITHUB_RETENTION_DAYS -e GITHUB_RUN_ATTEMPT -e GITHUB_ACTOR -e GITHUB_WORKFLOW -e GITHUB_HEAD_REF -e GITHUB_BASE_REF -e GITHUB_EVENT_NAME -e GITHUB_SERVER_URL -e GITHUB_API_URL -e GITHUB_GRAPHQL_URL -e GITHUB_REF_NAME -e GITHUB_REF_PROTECTED -e GITHUB_REF_TYPE -e GITHUB_WORKSPACE -e GITHUB_ACTION -e GITHUB_EVENT_PATH -e GITHUB_ACTION_REPOSITORY -e GITHUB_ACTION_REF -e GITHUB_PATH -e GITHUB_ENV -e RUNNER_OS -e RUNNER_ARCH -e RUNNER_NAME -e RUNNER_TOOL_CACHE -e R...
using amplify available at PATH
/usr/local/bin/amplify
amplify version Initializing new Amplify CLI version...
Done initializing new version.
Scanning for plugins...
Plugin scan successful
Invalid feature flag configuration
These feature flags are defined in the "amplify/cli.json" configuration file and are unknown to the currently running Amplify CLI:
- latestregionsupport
- project
- graphqltransformer.improvepluralization
- graphqltransformer.transformerversion
- graphqltransformer.suppressschemamigrationprompt
- auth.forcealiasattributes
- auth.useenabledmfas
- codegen.emitauthprovider
- codegen.generateindexrules
- codegen.enabledartnullsafety
This issue likely happens when the project has been pushed with a newer version of Amplify CLI, try updating to a newer version.
Ensure that the CI/CD pipeline is not using an older or pinned down version of Amplify CLI.
Learn more about feature flags: https://docs.amplify.aws/cli/reference/feature-flags
found existing environment sc
Invalid feature flag configuration
These feature flags are defined in the "amplify/cli.json" configuration file and are unknown to the currently running Amplify CLI:
- latestregionsupport
- project
- graphqltransformer.improvepluralization
- graphqltransformer.transformerversion
- graphqltransformer.suppressschemamigrationprompt
- auth.forcealiasattributes
- auth.useenabledmfas
- codegen.emitauthprovider
- codegen.generateindexrules
- codegen.enabledartnullsafety
This issue likely happens when the project has been pushed with a newer version of Amplify CLI, try updating to a newer version.
Ensure that the CI/CD pipeline is not using an older or pinned down version of Amplify CLI.
Learn more about feature flags: https://docs.amplify.aws/cli/reference/feature-flags
Update: specifying the amplify version amplify_cli_version: '7.6.9'
in the action, seems to work.
My question is: why i have to specify the version? By default is not taken the last one?
WFM. For completeness:
- name: Configure Amplify
uses: ambientlight/[email protected]
with:
amplify_command: configure
amplify_env: production
amplify_cli_version: 7.6.22
env:
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
AWS_REGION: us-east-1
- name: Deploy
uses: ambientlight/[email protected]
with:
amplify_command: publish
amplify_env: production
amplify_cli_version: 7.6.22
env:
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
AWS_REGION: us-east-1