shallwefootball / upload-s3-action

github action for upload to S3 ☁️
https://github.com/marketplace/actions/upload-s3
166 stars 158 forks source link

Upload file is not working #32

Open Judahh opened 3 years ago

Judahh commented 3 years ago

Error: ENOTDIR: not a directory, scandir '/w/auth/auth/package.json' at Object.readdirSync (fs.js:854:3) at klawSync (/w/_actions/shallwefootball/s3-upload-action/master/dist/index.js:8458:25) at Object.104 (/w/_actions/shallwefootball/s3-upload-action/master/dist/index.js:2451:15) at __webpack_require (/w/_actions/shallwefootball/s3-upload-action/master/dist/index.js:22:30) at startup (/__w/_actions/shallwefootball/s3-upload-action/master/dist/index.js:37:19) at /w/_actions/shallwefootball/s3-upload-action/master/dist/index.js:41:18 at Object. (/__w/_actions/shallwefootball/s3-upload-action/master/dist/index.js:44:10) at Module._compile (internal/modules/cjs/loader.js:959:30) at Object.Module._extensions..js (internal/modules/cjs/loader.js:995:10) at Module.load (internal/modules/cjs/loader.js:815:32) { errno: -20, syscall: 'scandir', code: 'ENOTDIR', path: '/__w/auth/auth/package.json' } Run shallwefootball/s3-upload-action@master /usr/bin/docker exec 1fd74c4c7fb9eb8aed542a299a9001e6612b3feffdf29e6773fa5bc7a15e4531 sh -c "cat /etc/*release | grep ^ID" internal/fs/utils.js:220 throw err; ^

Error: ENOTDIR: not a directory, scandir '/w/auth/auth/package.json' at Object.readdirSync (fs.js:854:3) at klawSync (/w/_actions/shallwefootball/s3-upload-action/master/dist/index.js:8458:25) at Object.104 (/w/_actions/shallwefootball/s3-upload-action/master/dist/index.js:2451:15) at __webpack_require (/w/_actions/shallwefootball/s3-upload-action/master/dist/index.js:22:30) at startup (/__w/_actions/shallwefootball/s3-upload-action/master/dist/index.js:37:19) at /w/_actions/shallwefootball/s3-upload-action/master/dist/index.js:41:18 at Object. (/__w/_actions/shallwefootball/s3-upload-action/master/dist/index.js:44:10) at Module._compile (internal/modules/cjs/loader.js:959:30) at Object.Module._extensions..js (internal/modules/cjs/loader.js:995:10) at Module.load (internal/modules/cjs/loader.js:815:32) { errno: -20, syscall: 'scandir', code: 'ENOTDIR', path: '/__w/auth/auth/package.json' }

- name: Upload Package to S3
        uses: shallwefootball/s3-upload-action@master
        id: PKGS3
        with:
          aws_key_id: ${{ secrets.AWS_KEY_ID }}
          aws_secret_access_key: ${{ secrets.AWS_SECRET_ACCESS_KEY}}
          aws_bucket: ${{ secrets.AWS_BUCKET }}
          source_dir: "package.json"
          destination_dir: "auth/staging"

Run shallwefootball/s3-upload-action@master /usr/bin/docker exec 97acfe3bbeaf16ccdba64c9396dd16d1c689243c4974d4208a0c5c73063c7ba8 sh -c "cat /etc/*release | grep ^ID" internal/fs/utils.js:220 throw err; ^

Error: ENOTDIR: not a directory, scandir '/w/auth/auth/package.json' at Object.readdirSync (fs.js:854:3) at klawSync (/w/_actions/shallwefootball/s3-upload-action/master/dist/index.js:8458:25) at Object.104 (/w/_actions/shallwefootball/s3-upload-action/master/dist/index.js:2451:15) at __webpack_require (/w/_actions/shallwefootball/s3-upload-action/master/dist/index.js:22:30) at startup (/__w/_actions/shallwefootball/s3-upload-action/master/dist/index.js:37:19) at /w/_actions/shallwefootball/s3-upload-action/master/dist/index.js:41:18 at Object. (/__w/_actions/shallwefootball/s3-upload-action/master/dist/index.js:44:10) at Module._compile (internal/modules/cjs/loader.js:959:30) at Object.Module._extensions..js (internal/modules/cjs/loader.js:995:10) at Module.load (internal/modules/cjs/loader.js:815:32) { errno: -20, syscall: 'scandir', code: 'ENOTDIR', path: '/__w/auth/auth/package.json' }

shimon-elbaz commented 3 years ago

i am getting this error as well , @Judahh did you find a solution or a workaround for that?

klaus993 commented 1 year ago

@shimon-elbaz I did, I just made sure AWS CLI is installed in my runner and stopped using this upload-s3-action thing. Just aws s3 cp as you would on your CLI, sending aws access key via env vars: https://stackoverflow.com/a/59184490/8322081