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

Commit

Permalink
Revert "feat: remove docker config (#5525)" (#5526)
Browse files Browse the repository at this point in the history
This reverts commit b1e8a80.
  • Loading branch information
habib-deriv authored Sep 2, 2023
1 parent b1e8a80 commit f6ffea0
Show file tree
Hide file tree
Showing 3 changed files with 2,204 additions and 2,174 deletions.
16 changes: 16 additions & 0 deletions .github/workflows/production.yml
Original file line number Diff line number Diff line change
Expand Up @@ -48,11 +48,27 @@ jobs:
# For using same tag for staging and production we need to uncomment these two below lines:
# with:
# tagRegex: "production(.*)"
- name: Building docker image 🐳
run: docker build -t ${{ secrets.DOCKHUB_ORGANISATION }}/deriv-com:latest -t ${{ secrets.DOCKHUB_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
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
- name: Deploy πŸš€
run: |
export NAMESPACE="deriv-com-production"
export SERVICEACCOUNT_TOKEN=${{ secrets.SERVICEACCOUNT_TOKEN }}
export DOCKERHUB_ORGANISATION=${{ secrets.DOCKERHUB_ORGANISATION }}
export KUBE_SERVER=${{ secrets.KUBE_SERVER }}
export CA=${{ secrets.CA }}
git clone https://github.com/binary-com/devops-ci-scripts
cd devops-ci-scripts/k8s-build_tools
Expand Down
16 changes: 15 additions & 1 deletion .github/workflows/staging.yml
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,21 @@ jobs:
# For using same tag for staging and production we need to uncomment these two below lines:
# with:
# tagRegex: "staging(.*)"

- name: Building docker image 🐳
run: docker build -t ${{ secrets.DOCKHUB_ORGANISATION }}/deriv-com:latest-staging -t ${{ secrets.DOCKHUB_ORGANISATION }}/deriv-com:$GITHUB_SHA .

- name: Verify nginx image
run: |
set -e
docker run --rm ${{ secrets.DOCKHUB_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
- name: Deploy πŸš€
run: |
export NAMESPACE="deriv-com-staging"
Expand Down
Loading

0 comments on commit f6ffea0

Please sign in to comment.