-
Notifications
You must be signed in to change notification settings - Fork 43
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
Optional inputs don't work #3
Comments
Difficult to tell what is wrong. Maybe it's some error with calling dep from nodejs: Also, please var_dump $argv from deploy.php file, lets print and see what the actual command is. |
I think the main problem, is that the parameter contains spaces: |
What do you mean with
Do you have a code example? |
var_dump($argv); |
This is the output:
But it should be
This is what I get if I run the command |
Yes, looks like there can be a better solution with correct splitting in js code. Will implement it. |
In the meantime, I was able to able to change the secret dynamically like that: jobs:
deploy:
name: Deploy
runs-on: ubuntu-latest
env:
composer_auth: ${{ secrets.COMPOSER_AUTH }}
steps:
- name: Set environment variables
run: |
echo "composer_auth_deployer=${composer_auth//' '/'+'}" >> $GITHUB_ENV
# Do all the checkout, building, etc...
- name: Deploy website
uses: deployphp/action@v1.0.5
with:
private-key: ${{ secrets.SSH_PRIVATE_KEY }}
known-hosts: ${{ secrets.SSH_KNOWN_HOSTS }}
dep: deploy ${{ env.stage }} --composer_auth ${{ env.composer_auth_deployer }} and in the PHP: if (input()->hasOption('composer_auth')) {
$config = input()->getOption('composer_auth');
if ($config) {
cd('{{release_path}}');
run('{{bin/composer}} config --auth ' . urldecode($config));
}
} But of course, it would be much nicer if I could use composer_auth directly. |
Released v1.0.6. Please test it. |
With 1.0.6 I'll following error:
|
This is strange. Will fix it. |
If you made the commit, I can make a test against |
Release a fix in v1.0.7 |
Is it fixed? |
Yeah, it works now as expected, thank you a lot 🎉 |
If I run the deploy command with optional input values, I get always the error
Too many arguments, expected arguments "command" "stage".
If I run this command from my local machine, everything works fine.
This is my configuration
And this is in my PHP file:
The text was updated successfully, but these errors were encountered: