koslib / helm-eks-action

The simplest Github Action for executing Helm commands on EKS - cluster authentication included
MIT License
59 stars 61 forks source link

Set output using multiline output syntax #58

Closed miguelaferreira closed 1 year ago

miguelaferreira commented 1 year ago

This PR fixes #56 by using the multiline syntax for GitHub Actions outputs.

To test this code I've built a container image (ghcr.io/miguelaferreira/ga-helm-eks:fix-issue-56) with the code in this PR. Then I used that image in a workflow job like this:

jobs:
  test-fix:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v3
      - uses: "docker://ghcr.io/miguelaferreira/ga-helm-eks:fix-issue-56"
        id: action
        with:
          command: |
            echo "line 1"
            echo "line 2"
      - run: echo -e "Output from action is:\n${{ steps.action.outputs.response }}"

The result was the multiline output:

Output from action is:
line 1
line 2