Comments (14)
Yes, looks like there can be a better solution with correct splitting in js code. Will implement it.
from action.
This is strange. Will fix it.
from action.
If you made the commit, I can make a test against @master
from action.
Yeah, it works now as expected, thank you a lot 🎉
from action.
Difficult to tell what is wrong. Maybe it's some error with calling dep from nodejs:
https://github.com/deployphp/action/blob/master/index.js#L48
Also, please var_dump $argv from deploy.php file, lets print and see what the actual command is.
from action.
I think the main problem, is that the parameter contains spaces: http-basic.domain.tld user password
. I wrote the task who uses this input to use URL decode so that I'm able to write http-basic.domain.tld+user+password
. With this, it works. But now I can't (or at least I don't know how) replace the spaces with an +
in the secret. (I need the secret also in another place with the spaces)
from action.
What do you mean with
Also, please var_dump $argv from deploy.php file, lets print and see what the actual command is.
Do you have a code example?
from action.
var_dump($argv);
from action.
This is the output:
array(7) {
[0] => string "bin/dep"
[1] => string "deploy"
[2] => string "staging"
[3] => string "--composer_auth"
[4] => string "'domain.tld"
[5] => string "user"
[6] => string"password'"
}
But it should be
array(7) {
[0] => string "bin/dep"
[1] => string "deploy"
[2] => string "staging"
[3] => string "--composer_auth"
[4] => string "domain.tld user password"
}
This is what I get if I run the command dep deploy staging --composer_auth "domain.tld user password"
in the CLI manually
from action.
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/[email protected]
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.
from action.
Released v1.0.6. Please test it.
from action.
With 1.0.6 I'll following error:
internal/modules/cjs/loader.js:800
throw err;
^
Error: Cannot find module 'argv-split'
Require stack:
- /home/runner/work/_actions/deployphp/action/v1.0.6/index.js
at Function.Module._resolveFilename (internal/modules/cjs/loader.js:797:15)
at Function.Module._load (internal/modules/cjs/loader.js:690:27)
at Module.require (internal/modules/cjs/loader.js:852:19)
at require (internal/modules/cjs/helpers.js:74:18)
at Object.<anonymous> (/home/runner/work/_actions/deployphp/action/v1.0.6/index.js:4:15)
at Module._compile (internal/modules/cjs/loader.js:959:30)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:995:10)
at Module.load (internal/modules/cjs/loader.js:815:32)
at Function.Module._load (internal/modules/cjs/loader.js:727:14)
at Function.Module.runMain (internal/modules/cjs/loader.js:1047:10) {
code: 'MODULE_NOT_FOUND',
requireStack: [ '/home/runner/work/_actions/deployphp/action/v1.0.6/index.js' ]
}
from action.
Release a fix in v1.0.7
from action.
Is it fixed?
from action.
Related Issues (20)
- Quotes not recognize as quotes when setting options HOT 1
- Node12 is deprecated HOT 7
- Egress is over the account limit HOT 1
- Task composer install and npm build in runner HOT 7
- PHP Warning: require(contrib/npm.php): Failed to open stream: No such file or directory in HOT 1
- Deploy failing HOT 18
- How to set directory where deploy has to be made HOT 1
- Ambiguous key verification error HOT 2
- Deployer appends known hosts rather than replacing them
- curl -LO undefined HOT 3
- Bug: verbosity level option doesn't work HOT 3
- Username / Password authentication HOT 1
- Deployer 7.3.1 is missing in the manifest HOT 2
- `options` is not working HOT 1
- Puzzling ssh fail HOT 1
- GitHub Actions' native `run` HOT 3
- Check composer global home for dep binary as well
- `Invalid JSON in options` error when omitting the options input entirely HOT 1
- Node.js 16 actions are deprecated -> use Node.js 20 instead HOT 1
- Upgrade Node.js to version 20 HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from action.