Skip to content

Workaround to preserve full path to artifact, add a wildcard to the first folder of the absolute path #185

@github-actions

Description

@github-actions

# FIXME: Workaround to preserve full path to artifact, add a wildcard to the first folder of the absolute path

        with:
          source: ${{ steps.get-changed-manifests.outputs.changed-manifests }}

      # FIXME: Workaround to preserve full path to artifact, add a wildcard to the first folder of the absolute path
      - id: generated-documentation
        uses: actions/github-script@ed597411d8f924073f98dfc5c65a23a2325f34cd # v8.0.0
        with:
          script: |
            const { join } = require('path');
            const destinations = ${{ toJson(steps.generate-documentation.outputs.destination) }};
            const artifactPaths = destinations
              .split('\n')
              .map(destination => join(${{ toJson(github.workspace) }},destination).replace(/\/([^/]+)/, '/*$1'))
              .join('\n');
            core.setOutput('artifact-paths', artifactPaths);

      - id: upload-artifact
        uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4.6.2
        with:
          name: changed-files
          path: ${{ steps.generated-documentation.outputs.artifact-paths }}

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions