Skip to content
This repository has been archived by the owner on Sep 26, 2024. It is now read-only.

Commit

Permalink
Ako/ add missing env variable (#6002)
Browse files Browse the repository at this point in the history
* ci: add missing env variable

* ci: rename the secret name
  • Loading branch information
ali-hosseini-deriv authored Nov 22, 2023
1 parent c91c39d commit 17df29a
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 8 deletions.
9 changes: 5 additions & 4 deletions .github/workflows/production.yml
Original file line number Diff line number Diff line change
Expand Up @@ -64,26 +64,27 @@ 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:
KUBE_SERVER: ${{ secrets.KUBE_SERVER }}
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
Expand Down
9 changes: 5 additions & 4 deletions .github/workflows/staging.yml
Original file line number Diff line number Diff line change
Expand Up @@ -61,26 +61,27 @@ 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:
KUBE_SERVER: ${{ secrets.KUBE_SERVER }}
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
Expand Down

1 comment on commit 17df29a

@vercel
Copy link

@vercel vercel bot commented on 17df29a Nov 22, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Successfully deployed to the following URLs:

deriv-com – ./

deriv-com.binary.sx
deriv-com-git-master.binary.sx

Please sign in to comment.