5050 runs-on : ${{ fromJson(inputs.runs-on) }}
5151 outputs :
5252 changed-documentations : ${{ steps.generate-documentation.outputs.destination }}
53+ artifact-id : ${{ steps.upload-artifact.outputs.artifact-id }}
5354
5455 steps :
5556 - uses : actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
@@ -121,16 +122,21 @@ jobs:
121122 with :
122123 source : ${{ steps.get-changed-manifests.outputs.changed-manifests }}
123124
125+ # FIXME: Workaround to preserve full path to artifact, add a wildcard to the first folder of the absolute path
124126 - id : generated-documentation
125127 uses : actions/github-script@ed597411d8f924073f98dfc5c65a23a2325f34cd # v8.0.0
126128 with :
127129 script : |
128- // FIXME: Workaround to preserve full path to artifact, add a wildcard to the first folder of the absolute path
130+ const { join } = require(' path');
129131 const destinations = ${{ toJson(steps.generate-documentation.outputs.destination) }};
130- const artifactPaths = destinations.map(d => d.replace(/\/([^/]+)/, '/*$1'));
132+ const artifactPaths = destinations
133+ .split('\n')
134+ .map(destination => join(${{ toJson(github.workspace) }},destination).replace(/\/([^/]+)/, '/*$1'))
135+ .join('\n');
131136 core.setOutput('artifact-paths', artifactPaths);
132137
133- - uses : actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4.6.2
138+ - id : upload-artifact
139+ uses : actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4.6.2
134140 with :
135141 name : changed-files
136142 path : ${{ steps.generated-documentation.outputs.artifact-paths }}
@@ -147,7 +153,7 @@ jobs:
147153
148154 - uses : actions/download-artifact@634f93cb2916e3fdff6788551b99b062d0335ce0 # v5.0.0
149155 with :
150- pattern : changed-files
156+ artifact-ids : ${{ needs.generate-documentation.outputs.artifact-id }}
151157 path : /
152158
153159 # jscpd:ignore-start
0 commit comments