Docker GitHub操作工作流错误:权限被拒绝

Docker GitHub操作工作流错误:权限被拒绝,docker,github-actions,Docker,Github Actions,我正在运行GitHub操作工作流,但由于以下错误而失败 Unhandled exception: FileSystemException: Cannot create file, path = '/github/home/.flutter' (OS Error: Permission denied, errno = 13) 我查看了一下,但找不到解决这个问题的任何说明 我的生成文件如下所示: name: Flutter CI on: [push] jobs: build: r

我正在运行GitHub操作工作流,但由于以下错误而失败

Unhandled exception:
FileSystemException: Cannot create file, path = '/github/home/.flutter' (OS Error: Permission denied, errno = 13)
我查看了一下,但找不到解决这个问题的任何说明

我的生成文件如下所示:

name: Flutter CI

on: [push]

jobs:
  build:

    runs-on: ubuntu-latest

    container:
      image:  cirrusci/flutter:v1.7.8-hotfix.4

    steps:
    - uses: actions/checkout@v1
    - name: Install dependencies
      run: flutter pub get
      working-directory: my_app
    - name: Run tests
      run: flutter test

终于有时间看了一下,加上
sudo
解决了这个问题

图像使用用户
cirrus
运行。还需要提供完整路径:

sudo /home/cirrus/sdks/flutter/bin/flutter pub get
来自GitHub:

Linux和macOS虚拟机都使用无密码sudo运行。 当您需要执行命令或安装需要更多功能的工具时 比当前用户更高的权限,您可以使用sudo而无需 提供密码


@Adii我不知道这有什么关系,GitHub现在允许我在他们自己的卷中创建文件