Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

No files were found with the provided path: build. No artifacts will be uploaded. #232

Closed
1 of 2 tasks
bkiac opened this issue Jun 30, 2021 · 16 comments
Closed
1 of 2 tasks
Labels
bug Something isn't working

Comments

@bkiac
Copy link

bkiac commented Jun 30, 2021

Describe the bug
I'm following the examples but I keep getting this error message: No files were found with the provided path: build. No artifacts will be uploaded.

Version

  • V1
  • V2

Screenshots
image

How to reproduce

Try to upload a folder

- name: Archive bundle
  uses: actions/upload-artifact@v2
  with:
    name: bundle
    path: build
    if-no-files-found: error

Additional context

I've found a similar issue on StackOverflow but the solution didn't work for me.

@bkiac bkiac added the bug Something isn't working label Jun 30, 2021
@K0-RR
Copy link

K0-RR commented Jul 13, 2021

Maybe try path: ./build or path: ./build/*.

@bkiac
Copy link
Author

bkiac commented Nov 9, 2021

./build, ./build/* don't work. The docs use it without an asterisk. Months later, I still can't make this work, on any project or repo, I'm really confused because no one else seems to have this issue.

@bkiac
Copy link
Author

bkiac commented Nov 9, 2021

I found the problem, the upload-artifact action does not use the working-directory setting

@bkiac bkiac closed this as completed Nov 9, 2021
@alanbosco003
Copy link

Hello can you please describe little more?
where to use working-directory? am new to github actions

@bkiac
Copy link
Author

bkiac commented Mar 11, 2022

@alanbosco003 I got the error because I used a working-directory default and relative path but you have to add a path from root:

build:
    runs-on: ubuntu-latest
    defaults:
      run:
        working-directory: ./react
    steps:
      - uses: actions/checkout@v2
      - run: yarn install --frozen-lockfile
      - run: yarn build
      - name: Archive build artifact
        uses: actions/upload-artifact@v2
        with:
          name: react-bundle
          path: react/react-bundle # ./react-bundle, ./react-bundle/*, react-bundle do not work
          if-no-files-found: error

@alanbosco003
Copy link

alanbosco003 commented Mar 14, 2022

jobs:
  build:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v1
      - uses: actions/setup-java@v1
        with:
          java-version: '12.x'
      - uses: subosito/flutter-action@v1
        with:
          channel: 'stable'
      - run: flutter pub get.
      - run: flutter build apk --debug
      - uses: actions/upload-artifact@v3
        with:
          name: debug-apk
          path: build\app\outputs\flutter-apk\app-debug.apk

I did like this but still showing the same error

Warning: No files were found with the provided path: build\app\outputs\flutter-apk\app-debug.apk. No artifacts will be uploaded.

Thanks, for the responce. it was my mistake.
Fixed it by change this path: build\app\outputs\flutter-apk\app-debug.apk to build/app/outputs/flutter-apk/app-debug.apk. 🤐

mendelsshop added a commit to mendelsshop/sideway_space_invaders that referenced this issue Mar 20, 2022
github-actions bot pushed a commit to mendelsshop/sideway_space_invaders that referenced this issue Mar 20, 2022
@noudadrichem
Copy link

This issue saved me 1 more hour of debugging. Why does it still take into account working-directory. Is this intended behavior?

@Bnowako
Copy link

Bnowako commented Jun 21, 2023

Thanks for the issue, I also don't know why it is still working like that. I guess backwards compatibility is the other issue if somebody wants to fix it 🤞

@HunteRoi
Copy link

@konradpabjan Any thought on adding workingDirectory support to actions/upload-artifact ?

@mitiko
Copy link

mitiko commented Jul 18, 2023

@konradpabjan Any thought on adding workingDirectory support to actions/upload-artifact ?

Seems like a good change for a 3.2 release :)

@arpit999
Copy link

In my case (Android Project) I need to specify the app as the root directory.

app/build/reports/lint-results-debug.html

@socketopp
Copy link

my-project/
├ src/
│ ├ lib/
│ │ ├ server/
│ │ │ └ [your server-only lib files]
│ │ └ [your lib files]
│ ├ params/
│ │ └ [your param matchers]
│ ├ routes/
│ │ └ [your routes]
│ ├ app.html
│ ├ error.html
│ ├ hooks.client.js
│ └ hooks.server.js
├ static/
│ └ [your static assets]
├ tests/
│ └ [your tests]
├ package.json
├ svelte.config.js
├ tsconfig.json
└ vite.config.js

Is my-project here the working directory when using SvelteKit? I am currently getting the same issue. Here is my deploy script

name: Deploy to GitHub Pages

on:
  push:
    branches:
      - master

jobs:
  build_site:
    runs-on: ubuntu-latest
    steps:
      - name: Checkout
        uses: actions/checkout@v3

      - name: Install Node.js
        uses: actions/setup-node@v3
        with:
          node-version: 18
          cache: 'npm'

      - name: Install dependencies
        run: npm install

      - name: build
        env:
          BASE_PATH: '/socketopp.github.io'
        run: |
          npm run build
          touch build/.nojekyll

      - name: Upload Artifacts
        uses: actions/upload-artifact@v2
        with:
          name: build-artifact
          path: 'build/'

  deploy:
    needs: build_site
    runs-on: ubuntu-latest

    permissions:
      pages: write
      id-token: write

    environment:
      name: github-pages
      url: ${{ steps.deployment.outputs.page_url }}

    steps:
      - name: Deploy
        id: deployment
        uses: actions/deploy-pages@v2

@Premsing
Copy link

Premsing commented Oct 1, 2023

No files were found with the provided path: cypress/videos. No artefacts will be uploaded.

      - uses: actions/upload-artifact@v3
        if: failure()
        with:
          name: cypress-screenshots
          path: cypress/screenshots
      # Test run video was always captured, so this action uses "always()" condition
      - uses: actions/upload-artifact@v3
        if: failure()
        with:
          name: cypress-videos
          path: cypress/videos

I even changed my IF condition to always(), but no videos were in the specified folder.

XInTheDark added a commit to XInTheDark/PVplayer that referenced this issue Oct 9, 2023
KooShnoo added a commit to KooShnoo/pokemon-programming that referenced this issue Dec 28, 2023
rebornplusplus added a commit to rebornplusplus/chiselled-python that referenced this issue Feb 15, 2024
Trying to fix upload-artifact not finding the rock path. Similar issue:
actions/upload-artifact#232.
@Rod-in-NM
Copy link

I found the problem, the upload-artifact action does not use the working-directory setting

Thank you for this. I'm having the same issue, but with a Windows server. I assume that the working-directory isn't set as I thought it would be. I'll experiment with it.

@colossus06
Copy link

I have a default working directory:

defaults:
  run:
   working-directory: ./nodejs-app

Still couldn't upload the artifact.
After reading the comments, fixed it by providing the exact path:

      - name: prepare the staging env
        run: mkdir test-results && cp test-report.html test-results
        
      - uses: actions/upload-artifact@v3
        if: success() || failure() 
        with:
          name: test-report.html
          path: ./nodejs-app/test-results

@abdifitahseefle
Copy link

this works to me perfectly all the time and with artfact@v1 and 2

 - run: flutter build apk 
      - uses: actions/upload-artifact@v2
        with:
          name: Mono-release-apk
          path: build/app/outputs/apk/release/app-release.apk``

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

14 participants