diff --git a/.github/workflows/docker.yml b/.github/workflows/docker.yml index 506569136..6d03abcc0 100644 --- a/.github/workflows/docker.yml +++ b/.github/workflows/docker.yml @@ -5,7 +5,7 @@ on: env: CI_RUST_TOOLCHAIN: 1.70.0 - REGISTRY_IMAGE: datenlord/xline + IMAGE_ID: ghcr.io/xline-kv/xline jobs: push_image: @@ -76,11 +76,12 @@ jobs: - name: Set up QEMU uses: docker/setup-qemu-action@v1 - - name: Login to DockerHub + - name: Login to GHCR uses: docker/login-action@v2 with: - username: ${{ secrets.DOCKERHUB_USERNAME }} - password: ${{ secrets.DOCKERHUB_TOKEN }} + registry: ghcr.io + username: xline-kv + password: ${{ secrets.GITHUB_TOKEN }} - name: Build Docker Image id: build_image @@ -88,7 +89,7 @@ jobs: with: context: ./scripts platforms: ${{ matrix.job.platform }} - outputs: type=image,name=${{ env.REGISTRY_IMAGE }},push-by-digest=true,name-canonical=true,push=true + outputs: type=image,name=${{ env.IMAGE_ID }},push-by-digest=true,name-canonical=true,push=true - name: Export Digest run: | diff --git a/.github/workflows/merge_image.yml b/.github/workflows/merge_image.yml index 691a82b2c..7c1c567a8 100644 --- a/.github/workflows/merge_image.yml +++ b/.github/workflows/merge_image.yml @@ -4,14 +4,9 @@ on: app_version: required: true type: string - secrets: - DOCKERHUB_USERNAME: - required: true - DOCKERHUB_TOKEN: - required: true env: - REGISTRY_IMAGE: datenlord/xline + IMAGE_ID: ghcr.io/xline-kv/xline jobs: merge_image: @@ -27,20 +22,21 @@ jobs: - name: Set up Docker Buildx uses: docker/setup-buildx-action@v2 - - name: Login to DockerHub + - name: Login to GHCR uses: docker/login-action@v2 with: - username: ${{ secrets.DOCKERHUB_USERNAME }} - password: ${{ secrets.DOCKERHUB_TOKEN }} + registry: ghcr.io + username: xline-kv + password: ${{ secrets.GITHUB_TOKEN }} - name: Push Manifest working-directory: /tmp/digests run: | docker buildx imagetools create \ - -t ${{ env.REGISTRY_IMAGE }}:latest \ - -t ${{ env.REGISTRY_IMAGE }}:${{ inputs.app_version }} \ - $(printf '${{ env.REGISTRY_IMAGE }}@sha256:%s ' *) + -t ${{ env.IMAGE_ID }}:latest \ + -t ${{ env.IMAGE_ID }}:${{ inputs.app_version }} \ + $(printf '${{ env.IMAGE_ID }}@sha256:%s ' *) - name: Inspect Manifest run: | - docker buildx imagetools inspect ${{ env.REGISTRY_IMAGE }}:${{ inputs.app_version }} + docker buildx imagetools inspect ${{ env.IMAGE_ID }}:${{ inputs.app_version }} diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 59051f630..c11683784 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -7,7 +7,7 @@ on: env: CI_RUST_TOOLCHAIN: 1.70.0 - REGISTRY_IMAGE: datenlord/xline + IMAGE_ID: ghcr.io/xline-kv/xline jobs: create_release: @@ -122,12 +122,13 @@ jobs: if: startsWith(matrix.job.platform, 'linux/') uses: docker/setup-qemu-action@v1 - - name: Login to DockerHub + - name: Login to GHCR if: startsWith(matrix.job.platform, 'linux/') uses: docker/login-action@v2 with: - username: ${{ secrets.DOCKERHUB_USERNAME }} - password: ${{ secrets.DOCKERHUB_TOKEN }} + registry: ghcr.io + username: xline-kv + password: ${{ secrets.GITHUB_TOKEN }} - name: Build Docker Image if: startsWith(matrix.job.platform, 'linux/') @@ -136,7 +137,7 @@ jobs: with: context: ./scripts platforms: ${{ matrix.job.platform }} - outputs: type=image,name=${{ env.REGISTRY_IMAGE }},push-by-digest=true,name-canonical=true,push=true + outputs: type=image,name=${{ env.IMAGE_ID }},push-by-digest=true,name-canonical=true,push=true - name: Export Digest if: startsWith(matrix.job.platform, 'linux/')