79295355

Date: 2024-12-19 19:10:37
Score: 0.5
Natty:
Report link

After a more thorough research and experimentation, I found out that composite actions must have their output value explicitly declared, referencing the internal step that outputs it.

In this case, you only have to add value: ${{ steps.get-commit-files.outputs.modified-files }} in action.yml in the output declaration:

(...)
outputs:
  modified-files:
    description: "A comma-separated list of modified files."
    value: ${{ steps.get-commit-files.outputs.modified-files }}

runs:
  using: "composite"
  steps:
    - name: Get modified files
      id: get-commit-files
      shell: bash
      run: |
(...)
        echo "modified-files=$FILTERED_PROJECTS" >> $GITHUB_OUTPUT

With that, you will be able to retrieve its value correctly through ${{ steps.action-test.outputs.modified-files }}" in the action-test.yml file.

Reasons:
  • Long answer (-0.5):
  • Has code block (-0.5):
  • Self-answer (0.5):
  • Low reputation (1):
Posted by: Cacangale