MansaGroup / nrwl-nx-action

A GitHub Action to wrap Nrwl Nx commands in your workflows.
MIT License
224 stars 19 forks source link

How to handle argument placement? #327

Open jeremylvln opened 1 year ago

jeremylvln commented 1 year ago

Following this comment from @ValeriyMaslenikov. I'm questioning myself how to place the arguments in the Nx command:

Two solutions:

  1. We add another input called nxArgs (or something like that) to the action for specific arguments to add before the --
  2. We expect anybody to add the -- manually, which could lead to hard debugging
ValeriyMaslenikov commented 1 year ago

Hey, @IamBlueSlime !

I think that probably these changes are still the reason for the incompatibility problems. We're using the @ago-dev/nx-aws-cdk-v2:deploy library to deploy the infrastructure using CDK constructs and based on the CI logs today it looks like this:

image

And on Friday we had a successful pipeline with the following output:

image

There were no changes in the configuration within these days and here it's hot it looks like:

      - uses: actions/checkout@v3
      - uses: actions/setup-node@v3
        with:
          node-version: 16
      - run: npm ci
      - name: Configure aws credentials
        uses: aws-actions/configure-aws-credentials@master
        with:
          aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY }}
          aws-secret-access-key: ${{ secrets.AWS_SECRET_KEY }}
          aws-region: 'us-east-2'
      - name: Deploy
        uses: MansaGroup/nrwl-nx-action@v3
        with:
          targets: deploy
          projects: project-name
          args: '--configuration=prod'
jeremylvln commented 1 year ago

@ValeriyMaslenikov I've shipped a v3.2.2 update (without updating the v3 tag for now). I decided not to ship a breaking change and require the users to add the -- separator on their side if they need it (which not everybody does, including you with your usecase).

It would be awesome if you could test this release and report me if everything work as intended :)