我正在使用github操作来构建cd / ci工作流。
我的Docker映像是从github包中的映像之一构建的。
FROM docker.pkg.github.com/USERNAME/REPO/IMAGE_NAME:latest
这是我的github工作流部署文件
name: Deploy
on:
push:
branches:
- cd-lab
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: fregante/setup-git-token@v1
with:
token: ${{ secrets.GITHUB_TOKEN }}
- uses: docker/login-action@v1
with:
registry: docker.pkg.github.com
username: USERNAME
password: ${{ secrets.GITHUB_TOKEN }}
- uses: docker/setup-qemu-action@v1
- uses: docker/setup-buildx-action@v1
- uses: docker/build-push-action@v2
with:
context: .
file: Dockerfile
执行docker/build-push-action@v2
时出现错误:
#4 ERROR: docker.pkg.github.com/USERNAME/REPO/IMAGE_NAME:latest@sha256:XXXXXXXXXXXXXXX: not found
Docker登录成功。
Run docker/login-action@v1
with:
registry: docker.pkg.github.com
username: USERNAME
password: ***
logout: true
? Logging into docker.pkg.github.com...
? Login Succeeded!
,图片确实显示在我的仓库中。为什么找不到该动作?