deployphp / action

GitHub Action for Deployer
MIT License
222 stars 44 forks source link

Quotes not recognize as quotes when setting options #48

Closed benjaminmal closed 1 year ago

benjaminmal commented 1 year ago

I have an error when setting my configuration option (like I would do in CLI):

-   name: Deploy
    uses: deployphp/action@v1
    with:
        dep: deploy production -o hostname="${{ secrets.PRODUCTION_HOSTNAME }}" -o remote_user="${{ secrets.PRODUCTION_REMOTE_USER }}" -o bin/php="${{ secrets.PRODUCTION_PHP_BIN }}" -o writable_mode="${{ secrets.PRODUCTION_WRITABLE_MODE }}" -o http_user="{{remote_user}}" --tag="${{ github.event.release.tag_name }}"
        private-key: ${{ secrets.HOST_SSH_KEY }}

Capture d’écran 2022-09-19 à 16 46 04

Note the issue disappear when I remove all the quotes. I use them generically in case there is a keyboard space in the path but I think it should be escaped. If it is too complicated, maybe setting cli arguments in inputs would be cleaner btw:

-   name: Deploy
    uses: deployphp/action@v1
    with:
        dep: deploy production
        private-key: ${{ secrets.HOST_SSH_KEY }}
        option: |
            hostname: ${{ secrets.PRODUCTION_HOSTNAME }}
            writable_mode: ${{ secrets.PRODUCTION_WRITABLE_MODE }}
            whatever-key: 'what_ever_value'
        tag: ${{ github.event.release.tag_name }}
        revision: 'custom_revision'
        branch: 'custom_branch'
        limit: 12
        no-hooks: true
        plan: true
        start-from: START-FROM
        log: LOG
        profile: PROFILE
        file: 'recipe_file_path'
antonmedv commented 1 year ago

Fixed with options: