From 7956318c534d15eb13df09fe1da2544146cbf677 Mon Sep 17 00:00:00 2001 From: sjqzhang Date: Thu, 26 Sep 2024 07:42:25 +0800 Subject: [PATCH] add login --- .github/workflows/docker-image.yml | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/.github/workflows/docker-image.yml b/.github/workflows/docker-image.yml index f55aff67..a9f17a11 100644 --- a/.github/workflows/docker-image.yml +++ b/.github/workflows/docker-image.yml @@ -14,6 +14,13 @@ jobs: steps: - uses: actions/checkout@v4 + - name: Log in to GitHub Container Registry + # 使用GITHUB_TOKEN登录,它允许操作推送容器镜像 + uses: docker/login-action@v2 + with: + registry: ghcr.io + username: ${{ github.repository_owner }} + password: ${{ secrets.GITHUB_TOKEN }} - name: Build and push uses: docker/build-push-action@v3 with: