From 4760f75824fb823c485a0ed536cb9676322f6f1f Mon Sep 17 00:00:00 2001 From: William Harrison Date: Wed, 9 Oct 2024 17:46:46 +0800 Subject: [PATCH] Update docker.yml --- .github/workflows/docker.yml | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/.github/workflows/docker.yml b/.github/workflows/docker.yml index 44f64f1..044691f 100644 --- a/.github/workflows/docker.yml +++ b/.github/workflows/docker.yml @@ -12,7 +12,9 @@ concurrency: env: DOCKER_IMAGE_NAME: ${{ secrets.DOCKER_USERNAME }}/${{ github.event.repository.name }} + DOCKER_REGISTRY: docker.io GITHUB_IMAGE_NAME: ${{ github.repository }} + GITHUB_REGISTRY: ghcr.io jobs: build-and-deploy: @@ -25,14 +27,14 @@ jobs: - name: Login to docker.io uses: docker/login-action@v3 with: - registry: docker.io + registry: ${{ env.DOCKER_REGISTRY }} username: ${{ secrets.DOCKER_USERNAME }} password: ${{ secrets.DOCKER_PASSWORD }} - name: Login to ghcr.io uses: docker/login-action@v3 with: - registry: ghcr.io + registry: ${{ env.GITHUB_REGISTRY }} username: ${{ github.actor }} password: ${{ secrets.GITHUB_TOKEN }}