Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Chain multiple amplify commands in a single step #15

Open
ChaitanyaKrishnaPappala opened this issue Jan 28, 2021 · 0 comments
Open

Chain multiple amplify commands in a single step #15

ChaitanyaKrishnaPappala opened this issue Jan 28, 2021 · 0 comments

Comments

@ChaitanyaKrishnaPappala
Copy link

ChaitanyaKrishnaPappala commented Jan 28, 2021

Thank you for the great package. This has been really handy in writing Github actions.
I have a situation where I need to use a former version of @aws/amplify for my Github actions.
The issue is I need to mention the amplify_cli_version for every step and the docker is installing the mentioned amplify_cli_version every time. This is taking a lot of time as it re-installs every thing again. If there is a way I can chain my commands like below that will be helpful.

with:
          amplify_cli_version: ${{ env.amplifyversion }}
          amplify_command: [configure, push ]
          amplify_env: ${{ env.amplifyenvironment }}
        env:
          AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
          AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
          AWS_REGION: ${{ env.awsregion }}

Below is my yml script,

name: 'Amplify Configuration'
on:
  push:
    branches:
      - develop

jobs:
  test:
    name: amplify-cli-action
    env:
      awsregion: us-east-1
      amplifyversion: 4.16.1
      amplifyenvironment: dev
    runs-on: ubuntu-latest

    steps:
      - uses: actions/checkout@v1
      - name: configure amplify
        uses: ambientlight/[email protected]
        with:
          amplify_cli_version: ${{ env.amplifyversion }}
          amplify_command: configure
          amplify_env: ${{ env.amplifyenvironment }}
        env:
          AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
          AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
          AWS_REGION: ${{ env.awsregion }}

      - name: deploy/push amplify
        uses: ambientlight/[email protected]
        with:
          amplify_cli_version: ${{ env.amplifyversion }}
          amplify_command: push
          amplify_env: ${{ env.amplifyenvironment }}
        env:
          AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
          AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
          AWS_REGION: ${{ env.awsregion }}

Screen Shot 2021-01-28 at 9 32 57 AM

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant