nrwl-nx-action
nrwl-nx-action copied to clipboard
How to handle argument placement?
Following this comment from @ValeriyMaslenikov. I'm questioning myself how to place the arguments in the Nx command:
- Placing them by default after a
--
will cause them to be ignored by Nx - So one cannot add Nx-specific arguments to the command (like
--configuration=prod
to handle production builds) - However, removing this
--
will require anybody to add them on their own for their arguments to be handled correctly by the executor (and not by Nx directly)
Two solutions:
- We add another input called
nxArgs
(or something like that) to the action for specific arguments to add before the--
- We expect anybody to add the
--
manually, which could lead to hard debugging
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](https://user-images.githubusercontent.com/5353364/215508481-450ec34b-3c2c-4cee-bca7-f8fe6c7c6e4d.png)
And on Friday we had a successful pipeline with the following output:
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'
@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 :)