我的存储库中有一些大文件,但我的工作流程出错了:
#1 10.83 From https://github.com/COMPANY/REPO
#1 10.83 * [new branch] master -> origin/master
#1 10.83 * [new tag] v1.3 -> v1.3
#1 10.84 * [new tag] v1.0 -> v1.0
#1 10.84 * [new tag] v1.1 -> v1.1
#1 10.84 * [new tag] v1.2 -> v1.2
#1 13.75 fatal: could not read Username for 'https://github.com': terminal prompts disabled
#1 13.75 Downloading LARGE_FILE (266 MB)
#1 13.76 fatal: could not read Username for 'https://github.com': terminal prompts disabled
#1 13.76 Error downloading object: LARGE_FILE (e2284a7): Smudge error: Error downloading LARGE_FILE (e2284a7d1831370990cc528257f6adabd0956fc9efd881a93518): batch response: Git credentials for https://github.com/COMPANY/MYREPO.git not found.
#1 13.76
#1 13.76 Errors logged to /var/lib/docker/overlay2/pzyrrovhp5mkymog2q1i/diff/lfs/logs/20210630T1859.150241137.log
#1 13.76 Use `git lfs logs last` to view the log.
#1 13.76 error: external filter 'git-lfs filter-process' failed
#1 13.76 fatal: LARGE_FILE: smudge filter lfs failed
#1 ERROR: failed to checkout remote https://github.com/COMPANY/MYREPO.git: exit status 128
------
> [internal] load git source https://github.com/COMPANY/REPO.git#7e17e06b0b0a8a1baa4601da07:
------
error: failed to solve: rpc error: code = Unknown desc = failed to solve with frontend dockerfile.v0: failed to read dockerfile: failed to checkout remote https://github.com/COMPANY/REPO.git: exit status 128
Error: buildx call failed with: error: failed to solve: rpc error: code = Unknown desc = failed to solve with frontend dockerfile.v0: failed to read dockerfile: failed to checkout remote https://github.com/COMPANY/REPO.git: exit status 128
我的行动yml:
name: Publish image
on:
release:
types: [published]
jobs:
push_to_registry:
name: Push Docker image to registry
runs-on: ubuntu-latest
steps:
- name: Check out the repo
uses: actions/checkout@v2
with:
lfs: true
token: ${{ secrets.REPO_TOKEN }}
- run: git lfs pull
- name: Log in to registry
uses: docker/login-action@v1
with:
username: ${{ secrets.REGISTRY_USERNAME }}
password: ${{ secrets.REGISTRY_PASSWORD }}
- name: Push to registry
uses: docker/build-push-action@v2
with:
push: true
tags: company/imagename:latest
这适用于没有大文件(LFS 关闭)的存储库。我已经尝试使用默认(个人)GITHUB_TOKEN 并生成了一个应该可以访问所有内容的 REPO_TOKEN,所以我不明白发生了什么。
我如何让它发挥作用?