Skip to content

[bug] "No files were found with the provided path" but prior step shows them #810

Description

@RossPatterson

What happened?

Step "Package release asset" runs an inline script that creates files in ${{ runner.temp }}/release-assets, and ends with an ls -lR of that directory, showing the file:

Step:

      - name: Package release asset
        shell: bash
        run: |
          set -euo pipefail

          tag="${GITHUB_REF_NAME}"
          payload_root="${{ runner.temp }}/release-payload"
          payload="${{ matrix.artifact_name }}"
          suffix="${payload#CREXX-}"
          asset_dir="${{ runner.temp }}/release-assets"
          asset="CREXX-${tag}-${suffix}.zip"

          ls -lR "$payload_root"
          mkdir -p "$asset_dir"
          if [ "${{ matrix.platform }}" = "macos" ]; then
            (cd "$payload_root" && ditto -c -k --norsrc --keepParent "$payload" "$asset_dir/$asset")
          else
            (cd "$payload_root" && zip -qr "$asset_dir/$asset" "$payload")
          fi
          echo "CREXX_RELEASE_ASSET=$asset_dir/$asset" >> "$GITHUB_ENV"
          ls -lR "$asset_dir"

Log:

2026-06-20T19:06:48.5760740Z �[36;1mls -lR "$asset_dir"�[0m
...
2026-06-20T19:06:48.8086507Z /home/runner/work/_temp/release-assets:
2026-06-20T19:06:48.8086931Z total 2044
2026-06-20T19:06:48.8087296Z -rw-r--r-- 1 root root 2091457 Jun 20 19:06 CREXX-f_buildcms-vm370-cms24.zip

The next step "Upload release asset" can't find the file:
Step:

      - name: Upload release asset
        # if: github.event_name == 'create'
        uses: actions/upload-artifact@v7
        with:
          name: ${{ matrix.artifact_name }}-release-asset
          path: ${{ runner.temp }}/release-assets
          if-no-files-found: error

Log:

2026-06-20T19:06:48.8191736Z ##[group]Run actions/upload-artifact@v7
2026-06-20T19:06:48.8192041Z with:
2026-06-20T19:06:48.8192266Z   name: CREXX-vm370-cms24-release-asset
2026-06-20T19:06:48.8192574Z   path: /home/runner/work/_temp/release-assets
2026-06-20T19:06:48.8192877Z   if-no-files-found: error
2026-06-20T19:06:48.8193113Z   compression-level: 6
2026-06-20T19:06:48.8193330Z   overwrite: false
2026-06-20T19:06:48.8193538Z   include-hidden-files: false
2026-06-20T19:06:48.8194104Z   archive: true
2026-06-20T19:06:48.8194296Z env:
2026-06-20T19:06:48.8194658Z   CREXX_RELEASE_ASSET: /home/runner/work/_temp/release-assets/CREXX-f_buildcms-vm370-cms24.zip
2026-06-20T19:06:48.8195096Z ##[endgroup]
2026-06-20T19:06:48.8198663Z ##[command]/usr/bin/docker exec  2cfd4bc21396fd3fbdf460daea7c77315f9ddec7ec8309f483aa92361c47b09f sh -c "cat /etc/*release | grep ^ID"
2026-06-20T19:06:49.0851277Z ##[error]No files were found with the provided path: /__w/_temp/release-assets. No artifacts will be uploaded.

What did you expect to happen?

I exepcted the upload-artifact action to find the file.

How can we reproduce it?

See https://github.com/RossPatterson/CREXX/actions/runs/27880954056/job/82508302520

Anything else we need to know?

The only notable point is that ${{ runner.temp }} shows as /home/runner/work/_temp/ in the Package log, and as /__w/_temp/ in the Upload log. But as best as I can tell, that's how the GitHub runner is supposed to work.

What version of the action are you using?

v7

What are your runner environments?

linux

Are you on GitHub Enterprise Server? If so, what version?

No

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions