I have created a Reusable Workflow using a workflow_call
trigger, but I need to run additional steps based on its outcome.
Example:
jobs:
released:
steps:
- name: Build
uses: my-org/some-repo/.github/workflows/build.yml@main
- name: Upload source maps
run: something
The reusable Build step builds my JS app and produces source maps. Now I need to upload these source maps to somewhere as a separate step that should only run inside this Released job.
Doing the above results in the following error:
Error : .github#L1
reusable workflows should be referenced at the top-level `jobs.*.uses' key, not within steps
It only allows running my reusable workflow inside a job, not inside a step. But by doing that I can no longer access the source maps.
My question: How do I reuse the steps from the Build workflow and access its output inside the Released job?