`options` is not working
The options input provided in the README is not working:
- name: Deploy
uses: deployphp/action@v1
with:
# Config options for the Deployer. Same as the `-o` flag in the CLI.
# Optional.
options:
keep_releases: 7
When trying to use it, i have a syntax error message.
I also tried this syntax: no error, but options are ignored.
options: |
keep_releases: 7
Upvote & Fund
- We're using Polar.sh so you can upvote and help fund this issue.
- We receive the funding once the issue is completed & confirmed by you.
- Thank you in advance for helping prioritize & fund our backlog.
If this can help, a workaround for this is to use the dep and pass options to the command line:
- uses: deployphp/action@v1
with:
dep: deploy host_name -o branch=main -o keep_releases=7
Github's action.yaml schema do not allow array-like input variables. Only scalars, not even booleans.
This is why
options:
keep_releases: 7
does not work.
This could work
options: |
keep_releases: 7
because it gets interpreted as string. But the key: value string then must get processed within the action --> here: https://github.com/deployphp/action/blob/280404946f8c7f7967b1c5d4615316f265df4833/index.js#L118
IMHO using deploy host_name -o branch=main -o keep_releases=7 is just fine, no need for the options config. I would also vote for deprecating it.