getCacheEntry 失败:缓存服务响应 503

Div*_*tha 26 python github-actions

我正在尝试检查 gitubaction 上的绒毛。我的github操作步骤如下

  lint:
    name: Lint
    runs-on: ubuntu-latest
    steps:
      - name: Checkout
        uses: actions/checkout@v3
      - name: Set up Python
        uses: actions/setup-python@v4
        with:
          python-version-file: '.python-version'
          cache: 'pip'
          cache-dependency-path: 'requirements.txt'
Run Code Online (Sandbox Code Playgroud)

下面附上错误截图 在此输入图像描述

你能帮我解决这个问题吗?

Har*_*esh 8

似乎问题来自 github 缓存操作。 https://github.com/actions/cache/issues/820


小智 2

lint:
name: Lint
runs-on: ubuntu-latest
steps:
  - name: Checkout
    uses: actions/checkout@v3
  - name: Set up Python
    uses: actions/setup-python@v4
    with:
      python-version-file: '.python-version'
  - name: Cache dependencies
    uses: actions/cache@v3
    with:
      path: ~/.cache/pip
      key: ${{ runner.os }}-pip-${{ hashFiles('requirements.txt') }}
      restore-keys: |
          ${{ runner.os }}-pip-
          ${{ runner.os }}-
Run Code Online (Sandbox Code Playgroud)

我也面临同样的问题。这是因为cache服务器没有响应,包括服务器内部错误或任何其他错误。您可以使用usingactions/cache@v3来代替自动缓存,因为它的作用相同,但仅在服务器错误时给出警告pythoncache: 'pip'action/cache