amplify-cli-action icon indicating copy to clipboard operation
amplify-cli-action copied to clipboard

Action amplify CLI version

Open MateoKruk opened this issue 3 years ago • 6 comments

When using the action I get the following error:

image

MateoKruk avatar Jul 07 '21 21:07 MateoKruk

For some reason ambientlight/[email protected] is still using amplify version 4.52.0 however the latest published version on npm is 5.5.0. According to the readme isn't amplify-cli-action supposed to be pulling the @latest from npm? This has broken my deployment workflows because there are breaking changes between version 4 and version 5 of the amplify cli.

applyinnovations avatar Sep 14 '21 05:09 applyinnovations

The Dockerfile in the master branch https://github.com/ambientlight/amplify-cli-action/blob/master/Dockerfile runs npm install --global --unsafe-perm @aws-amplify/cli@latest however only version 4.52.0 is used not 5.5.0.

On my local machine:

$ npm view @aws-amplify/cli@latest
@aws-amplify/[email protected] | Apache-2.0 | deps: 68 | versions: 958

Anyone know why our actions are still using an old version?

applyinnovations avatar Sep 14 '21 06:09 applyinnovations

Hey all, I'm having the same issue. Is there an ETA for this? 🙏 🙏

etaytch avatar Sep 16 '21 10:09 etaytch

I can confirm that specifying the amplify version within your workflow can be used as a temporary fix.

    uses: ambientlight/[email protected]
    with:
        amplify_cli_version: '5.6.0'

applyinnovations avatar Sep 16 '21 10:09 applyinnovations

Even better is to do the following:

env:
  AMPLIFY_CLI_VERION: 'latest'
jobs:
    init:
        - name: Amplify configure
        uses: ambientlight/[email protected]
        with:
          amplify_command: configure
          amplify_cli_version: ${{ env.AMPLIFY_CLI_VERION }}

applyinnovations avatar Sep 19 '21 10:09 applyinnovations

This worked well for me

  - name: deploy
    uses: ambientlight/[email protected]
    with:
      amplify_command: publish
      amplify_env: sandbox
      amplify_cli_version: 'latest'

hedleysmith avatar Dec 09 '21 12:12 hedleysmith