actions / setup-node

Set up your GitHub Actions workflow with a specific version of node.js
MIT License
3.9k stars 1.28k forks source link

node-setup@v1 permission denied, mkdir '/home/actions' when checking cach #23

Closed bdougie closed 5 years ago

bdougie commented 5 years ago

What is this?

I added Actions to my repo using the node-setup@v1 (added by clicking the template) to my repo and received the below error message.

##[debug]checking cache: /home/actions/cache/node/10.16.1/x64
##[debug]not found
##[error]EACCES: permission denied, mkdir '/home/actions'
##[error]Node run failed with exit code 1

Reverting to node-setup@master, which is currently 2 commits behind the v1 release works without an issue. Those commits seem trivial as well, just removing node_modules.

thought

My guess is that it has to do with the current failure on the v1-release but it doesn't seem to be related. I am not sure what PR #21 is related to but it doesn't seem to anything to do with this as well.

details

repo/pr in question: https://github.com/github/newsletter-bot/pull/8/files failing check: https://github.com/github/newsletter-bot/pull/8/checks?check_run_id=185763954

// nodejs.yml

on: [push]

name: Node.js

jobs:

  build:
    name: Build
    runs-on: ubuntu-latest
    steps:

    - uses: actions/checkout@master

    - name: Use Node.js 10.x
      uses: actions/setup-node@v1
      with:
        version: 10.x

    - name: npm install, build, and test
      run: |
        npm install
        npm run build --if-present
        npm test
damccorm commented 5 years ago

Could you try again? This issue popped up because we were consuming an old version of the tool-cache which we have since fixed (I was seeing this issue myself and it fixed it for me)

bdougie commented 5 years ago

confirming that it is now fixed. Thanks @damccorm

axetroy commented 4 years ago

It seem that the problem is still exist

see https://github.com/axetroy/wsm/runs/394660912#step:3:4

name: frontend

on: [push, pull_request]

jobs:
  test:
    runs-on: ${{ matrix.os }}
    timeout-minutes: 10
    strategy:
      matrix:
        node: ['v12.4.1']
        os: [ubuntu-latest]
    name: Node.js ${{ matrix.node }} test in ${{ matrix.os }}

    steps:
      - uses: actions/checkout@master
        with:
          fetch-depth: 1

      - uses: actions/setup-node@v1
        with:
          node-version: ${{ matrix.node }}

      - name: Dependency
        working-directory: ./frontend
        run: yarn

      - name: Build
        working-directory: ./frontend
        run: npm run build