From f3c4f24d0b14705346a10d4b4864fba0cc531f83 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=99=B3=E9=88=9E?= Date: Wed, 20 Dec 2023 18:31:35 +0800 Subject: [PATCH] Use DOCKERHUB_ORGANIZATION_NAME for docker CI --- .../docker-reused-setup-steps/action.yml | 15 +++------------ .github/workflows/docker_publish.yml | 9 +++------ 2 files changed, 6 insertions(+), 18 deletions(-) diff --git a/.github/workflows/docker-reused-setup-steps/action.yml b/.github/workflows/docker-reused-setup-steps/action.yml index 5f92570..0030bf6 100644 --- a/.github/workflows/docker-reused-setup-steps/action.yml +++ b/.github/workflows/docker-reused-setup-steps/action.yml @@ -3,14 +3,12 @@ name: Setup docker description: Configure the docker workflow. inputs: + DOCKERHUB_ORGANIZATION_NAME : + required: true DOCKERHUB_USERNAME: required: true DOCKERHUB_TOKEN: required: true - QUAY_USERNAME: - required: true - QUAY_TOKEN: - required: true CR_PAT: required: true tag: @@ -31,7 +29,7 @@ runs: id: meta uses: docker/metadata-action@v5 with: - images: ${{ inputs.DOCKERHUB_USERNAME }}/fc2-live-dl,ghcr.io/${{ github.repository_owner }}/fc2-live-dl,quay.io/${{ github.repository_owner }}/fc2-live-dl + images: ${{ inputs.DOCKERHUB_ORGANIZATION_NAME }}/fc2-live-dl,ghcr.io/${{ github.repository_owner }}/fc2-live-dl flavor: | latest=${{ inputs.tag == 'alpine' }} tags: | @@ -63,10 +61,3 @@ runs: registry: ghcr.io username: ${{ github.repository_owner }} password: ${{ inputs.CR_PAT }} - - - name: Login to Quay Container Registry - uses: docker/login-action@v3 - with: - registry: quay.io - username: ${{ inputs.QUAY_USERNAME }} - password: ${{ inputs.QUAY_TOKEN }} diff --git a/.github/workflows/docker_publish.yml b/.github/workflows/docker_publish.yml index b465fa9..3375832 100644 --- a/.github/workflows/docker_publish.yml +++ b/.github/workflows/docker_publish.yml @@ -35,10 +35,9 @@ jobs: id: setup uses: ./.github/workflows/docker-reused-setup-steps with: + DOCKERHUB_ORGANIZATION_NAME : ${{ secrets.DOCKERHUB_ORGANIZATION_NAME }} DOCKERHUB_USERNAME: ${{ secrets.DOCKERHUB_USERNAME }} DOCKERHUB_TOKEN: ${{ secrets.DOCKERHUB_TOKEN }} - QUAY_USERNAME: ${{ secrets.QUAY_USERNAME }} - QUAY_TOKEN: ${{ secrets.QUAY_TOKEN }} CR_PAT: ${{ secrets.CR_PAT }} tag: alpine @@ -77,10 +76,9 @@ jobs: id: setup uses: ./.github/workflows/docker-reused-setup-steps with: + DOCKERHUB_ORGANIZATION_NAME : ${{ secrets.DOCKERHUB_ORGANIZATION_NAME }} DOCKERHUB_USERNAME: ${{ secrets.DOCKERHUB_USERNAME }} DOCKERHUB_TOKEN: ${{ secrets.DOCKERHUB_TOKEN }} - QUAY_USERNAME: ${{ secrets.QUAY_USERNAME }} - QUAY_TOKEN: ${{ secrets.QUAY_TOKEN }} CR_PAT: ${{ secrets.CR_PAT }} tag: ubi @@ -119,10 +117,9 @@ jobs: id: setup uses: ./.github/workflows/docker-reused-setup-steps with: + DOCKERHUB_ORGANIZATION_NAME : ${{ secrets.DOCKERHUB_ORGANIZATION_NAME }} DOCKERHUB_USERNAME: ${{ secrets.DOCKERHUB_USERNAME }} DOCKERHUB_TOKEN: ${{ secrets.DOCKERHUB_TOKEN }} - QUAY_USERNAME: ${{ secrets.QUAY_USERNAME }} - QUAY_TOKEN: ${{ secrets.QUAY_TOKEN }} CR_PAT: ${{ secrets.CR_PAT }} tag: distroless