From 17df29a5d7d9297a3255d35d77673a6c6e3e3fad Mon Sep 17 00:00:00 2001 From: "Ali(Ako) Hosseini" Date: Wed, 22 Nov 2023 13:24:47 +0800 Subject: [PATCH] Ako/ add missing env variable (#6002) * ci: add missing env variable * ci: rename the secret name --- .github/workflows/production.yml | 9 +++++---- .github/workflows/staging.yml | 9 +++++---- 2 files changed, 10 insertions(+), 8 deletions(-) diff --git a/.github/workflows/production.yml b/.github/workflows/production.yml index 09037baf6e4..aecf5574e76 100644 --- a/.github/workflows/production.yml +++ b/.github/workflows/production.yml @@ -64,19 +64,19 @@ jobs: run: echo "New website - http://cf-pages-deriv-com.deriv.com" - name: Building docker image 🐳 - run: docker build -t ${{ secrets.DOCKHUB_ORGANISATION }}/deriv-com:latest -t ${{ secrets.DOCKHUB_ORGANISATION }}/deriv-com:$GIT_TAG_NAME . + run: docker build -t ${{ secrets.DOCKERHUB_ORGANISATION }}/deriv-com:latest -t ${{ secrets.DOCKERHUB_ORGANISATION }}/deriv-com:$GIT_TAG_NAME . - name: Verify nginx image run: | set -e - docker run --rm ${{ secrets.DOCKHUB_ORGANISATION }}/deriv-com:$GIT_TAG_NAME nginx -t + docker run --rm ${{ secrets.DOCKERHUB_ORGANISATION }}/deriv-com:$GIT_TAG_NAME nginx -t echo "docker image validated successfully" - name: Pushing Image to docker hub 🐳 run: | echo ${{ secrets.DOCKERHUB_PASSWORD }}| docker login -u ${{ secrets.DOCKERHUB_USERNAME }} --password-stdin - docker push ${{ secrets.DOCKHUB_ORGANISATION }}/deriv-com:latest - docker push ${{ secrets.DOCKHUB_ORGANISATION }}/deriv-com:$GIT_TAG_NAME + docker push ${{ secrets.DOCKERHUB_ORGANISATION }}/deriv-com:latest + docker push ${{ secrets.DOCKERHUB_ORGANISATION }}/deriv-com:$GIT_TAG_NAME - name: Deploy 🚀 env: @@ -84,6 +84,7 @@ jobs: SERVICEACCOUNT_TOKEN: ${{ secrets.SERVICEACCOUNT_TOKEN }} CA_CRT: ${{ secrets.CA_CRT }} NAMESPACE: deriv-com-production + DOCKERHUB_ORGANISATION: ${{ secrets.DOCKERHUB_ORGANISATION }} run: | git clone https://github.com/binary-com/devops-ci-scripts cd devops-ci-scripts/k8s-build_tools diff --git a/.github/workflows/staging.yml b/.github/workflows/staging.yml index ecac9fe72cf..e38319aaf18 100644 --- a/.github/workflows/staging.yml +++ b/.github/workflows/staging.yml @@ -61,19 +61,19 @@ jobs: run: echo "New staging website - http://staging.cf-pages-deriv-com.deriv.com" - name: Building docker image 🐳 - run: docker build -t ${{ secrets.DOCKHUB_ORGANISATION }}/deriv-com:latest-staging -t ${{ secrets.DOCKHUB_ORGANISATION }}/deriv-com:$GITHUB_SHA . + run: docker build -t ${{ secrets.DOCKERHUB_ORGANISATION }}/deriv-com:latest-staging -t ${{ secrets.DOCKERHUB_ORGANISATION }}/deriv-com:$GITHUB_SHA . - name: Verify nginx image run: | set -e - docker run --rm ${{ secrets.DOCKHUB_ORGANISATION }}/deriv-com:$GITHUB_SHA nginx -t + docker run --rm ${{ secrets.DOCKERHUB_ORGANISATION }}/deriv-com:$GITHUB_SHA nginx -t echo "docker image validated successfully" - name: Pushing Image to docker hub 🐳 run: | echo ${{ secrets.DOCKERHUB_PASSWORD }}| docker login -u ${{ secrets.DOCKERHUB_USERNAME }} --password-stdin - docker push ${{ secrets.DOCKHUB_ORGANISATION }}/deriv-com:latest-staging - docker push ${{ secrets.DOCKHUB_ORGANISATION }}/deriv-com:$GITHUB_SHA + docker push ${{ secrets.DOCKERHUB_ORGANISATION }}/deriv-com:latest-staging + docker push ${{ secrets.DOCKERHUB_ORGANISATION }}/deriv-com:$GITHUB_SHA - name: Deploy 🚀 env: @@ -81,6 +81,7 @@ jobs: SERVICEACCOUNT_TOKEN: ${{ secrets.SERVICEACCOUNT_TOKEN }} CA_CRT: ${{ secrets.CA_CRT }} NAMESPACE: deriv-com-staging + DOCKERHUB_ORGANISATION: ${{ secrets.DOCKERHUB_ORGANISATION }} run: | git clone https://github.com/binary-com/devops-ci-scripts cd devops-ci-scripts/k8s-build_tools