From 7f371c88b83179c76586043777eed62b0190fbad Mon Sep 17 00:00:00 2001 From: Pierre Castro Date: Sun, 10 Nov 2024 02:59:23 +0100 Subject: [PATCH] fix: Workflow --- .github/actions/build-and-push/action.yml | 10 ++++++++-- .github/workflows/build-and-push-dev.yml | 2 ++ .github/workflows/build-and-push-prod.yml | 2 ++ 3 files changed, 12 insertions(+), 2 deletions(-) diff --git a/.github/actions/build-and-push/action.yml b/.github/actions/build-and-push/action.yml index b6052e9..2166152 100644 --- a/.github/actions/build-and-push/action.yml +++ b/.github/actions/build-and-push/action.yml @@ -8,6 +8,12 @@ inputs: service: description: "Service to build and push" required: true + dockerhub_username: + description: "Docker Hub username" + required: true + dockerhub_token: + description: "Docker Hub token" + required: true runs: using: "composite" @@ -23,8 +29,8 @@ runs: - name: Login to Docker Hub uses: docker/login-action@v1 with: - username: ${{ secrets.DOCKERHUB_USERNAME }} - password: ${{ secrets.DOCKERHUB_TOKEN }} + username: ${{ inputs.dockerhub_username }} + password: ${{ inputs.dockerhub_token }} - name: Build and push backend image shell: bash diff --git a/.github/workflows/build-and-push-dev.yml b/.github/workflows/build-and-push-dev.yml index ee44880..3c1880b 100644 --- a/.github/workflows/build-and-push-dev.yml +++ b/.github/workflows/build-and-push-dev.yml @@ -22,3 +22,5 @@ jobs: with: environment: "dev" service: ${{ matrix.service }} + dockerhub_username: ${{ secrets.DOCKERHUB_USERNAME }} + dockerhub_token: ${{ secrets.DOCKERHUB_TOKEN }} diff --git a/.github/workflows/build-and-push-prod.yml b/.github/workflows/build-and-push-prod.yml index c009577..9caa976 100644 --- a/.github/workflows/build-and-push-prod.yml +++ b/.github/workflows/build-and-push-prod.yml @@ -22,4 +22,6 @@ jobs: with: environment: "prod" service: ${{ matrix.service }} + dockerhub_username: ${{ secrets.DOCKERHUB_USERNAME }} + dockerhub_token: ${{ secrets.DOCKERHUB_TOKEN }}