Skip to content
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

options is not working #72

Open
Seb33300 opened this issue Jun 28, 2023 · 2 comments
Open

options is not working #72

Seb33300 opened this issue Jun 28, 2023 · 2 comments

Comments

@Seb33300
Copy link

Seb33300 commented Jun 28, 2023

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.
Fund with Polar
@Seb33300
Copy link
Author

Seb33300 commented Sep 13, 2023

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

@richardhj
Copy link

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:

action/index.js

Line 118 in 2804049

let optionsArg = core.getInput('options')


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.

This was referenced Jun 30, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants