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

Support multi-line arguments #88

Closed
bigdaz opened this issue Sep 30, 2021 · 2 comments
Closed

Support multi-line arguments #88

bigdaz opened this issue Sep 30, 2021 · 2 comments

Comments

@bigdaz
Copy link
Member

bigdaz commented Sep 30, 2021

Supplying the entire argument list on a single line can be cumbersome and make the workflow file difficult to read. A relatively simple solution would be to allow arguments to be supplied as a multi-line input. So instead of:

 - name: Build
      uses: gradle/gradle-build-action@v2
      with:
        arguments: build --info -PsomeService.prod.apiKey=${{ secrets.SOME_SERVICE_API_KEY }} -PsomeService.prod.secret=${{ secrets.SOME_SERVICE_API_SECRET }} -PsomeService.prod.projectId=${{ secrets.SOME_SERVICE_PROJECT_ID }}

one could use:

- name: Build
      uses: gradle/gradle-build-action@v2
      with:
        arguments: |
             build --info 
             -PsomeService.prod.apiKey=${{ secrets.SOME_SERVICE_API_KEY }} 
             -PsomeService.prod.secret=${{ secrets.SOME_SERVICE_API_SECRET }} 
             -PsomeService.prod.projectId=${{ secrets.SOME_SERVICE_PROJECT_ID }}

I think this option is preferable to a structured input parameter for properties since it keeps the action API simpler and is likely easier for new users to learn and understand.

Thanks @vlsi for the inspiration: #18 (comment).

@vlsi
Copy link

vlsi commented Sep 30, 2021

By the way, https://github.com/burrunan/gradle-cache-action#usage supports multiline arguments and properties

@bigdaz bigdaz closed this as completed in d1ab42c Oct 15, 2021
@bigdaz
Copy link
Member Author

bigdaz commented Oct 15, 2021

Turns out this was already working, and just needed a test and docs :).

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