From c9c2639f676b843945cb52ee0665d8f46a2f9a45 Mon Sep 17 00:00:00 2001 From: TwiN Date: Tue, 1 Apr 2025 18:28:07 -0400 Subject: [PATCH] ci: Push to ghcr instead of DockerHub for custom tags --- .github/workflows/publish-custom.yml | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/.github/workflows/publish-custom.yml b/.github/workflows/publish-custom.yml index b42a5f40..a68ecfd0 100644 --- a/.github/workflows/publish-custom.yml +++ b/.github/workflows/publish-custom.yml @@ -16,17 +16,18 @@ jobs: - name: Set up Docker Buildx uses: docker/setup-buildx-action@v3 - name: Get image repository - run: echo IMAGE_REPOSITORY=$(echo ${{ secrets.DOCKER_USERNAME }}/${{ github.event.repository.name }} | tr '[:upper:]' '[:lower:]') >> $GITHUB_ENV - - name: Login to Docker Registry + run: echo GHCR_IMAGE_REPOSITORY=$(echo ghcr.io/${{ github.actor }}/${{ github.event.repository.name }} | tr '[:upper:]' '[:lower:]') >> $GITHUB_ENV + - name: Login to GitHub Container Registry uses: docker/login-action@v3 with: - username: ${{ secrets.DOCKER_USERNAME }} - password: ${{ secrets.DOCKER_PASSWORD }} + registry: ghcr.io + username: ${{ github.actor }} + password: ${{ secrets.GITHUB_TOKEN }} - name: Docker meta id: meta uses: docker/metadata-action@v5 with: - images: ${{ env.IMAGE_REPOSITORY }} + images: ${{ env.GHCR_IMAGE_REPOSITORY }} tags: | type=raw,value=${{ inputs.tag }} - name: Build and push Docker image