Validate steps ids of composite action outputs
Hi, thanks for this awesome tool.
It has saved me many times from pushing a faulty version of my workflows. One issue that keeps biting me is what's described in the title.
For a more specific example of what I mean can be found in the following PR I made to a personal repository:
- https://github.com/anttiharju/vmatch/pull/361
Based on the example you provided, it looks like doing this would require parsing expressions, and then also fetching and parsing the referenced action to determine its outputs, and making sure the reference is valid. Is that correct? If so, this probably falls into a similar bucket to #99, with a dependency on an at least partial implementation of #22, with some #38 for flavour. Do you think I've got the right end of the stick?
Agree that a minimal implementation of #22 would be needed, but not sure about the need for network calls from #38.
I am thinking about validating internal consistency for a given composite action, i.e. with
name: "Underscore name"
description: "Output repository name with underscores instead of hyphens"
runs:
using: "composite"
steps:
- name: Convert hyphens to underscores
shell: bash
env:
REPO_NAME: ${{ github.event.repository.name }}
run: |
echo "name=${REPO_NAME//-/_}" >> "$GITHUB_OUTPUT"
outputs:
filename:
description: "Filename with underscores"
value: ${{ steps.file.outputs.name }}
the tool would report that no step with id file exists. Or with
name: "Underscore name"
description: "Output repository name with underscores instead of hyphens"
runs:
using: "composite"
steps:
- name: Convert hyphens to underscores
id: file
shell: bash
env:
REPO_NAME: ${{ github.event.repository.name }}
run: |
echo "name=${REPO_NAME//-/_}" >> "$GITHUB_OUTPUT"
outputs:
filename:
description: "Filename with underscores"
value: ${{ steps.fle.outputs.name }}
that no step with id fle exists. Unless I'm unaware of a way to define a valid output value without defining the id: for a step in the same file?
Perhaps I could have written a better description in the first place, apologies.