Skip to content

Commit

Permalink
fix: merge with master
Browse files Browse the repository at this point in the history
  • Loading branch information
akmal-deriv committed Jul 29, 2024
2 parents 71e4c04 + 93359a5 commit 5b27f06
Show file tree
Hide file tree
Showing 601 changed files with 14,325 additions and 13,984 deletions.
43 changes: 43 additions & 0 deletions .github/workflows/build_docker_passkey_image.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
name: Build Docker image and push to dockerhub
on:
workflow_dispatch:
inputs:
docker_image_tag_name:
type: string
description: Docker image tag name
required: true
jobs:
push_to_registry:
name: Push Docker image to Docker Hub
runs-on: ubuntu-latest
env:
tag_name: ${{ github.event.inputs.docker_image_tag_name }}
permissions:
packages: write
contents: read
attestations: write
id-token: write
steps:
- name: Check out the repo
uses: actions/checkout@v4

- name: Log in to Docker Hub
uses: docker/login-action@f4ef78c080cd8ba55a85445d5b36e214a81df20a
with:
username: ${{ secrets.WEB_ACCESS_DOCKERHUB_USERNAME }}
password: ${{ secrets.WEB_ACCESS_DOCKERHUB_PASSWORD }}

- name: Run Bootstrap
run: npm run bootstrap

- name: Run Build:prod
run: npm run build:prod

- name: Run Build Docker
run: docker build -t ${{ secrets.WEB_ACCESS_DOCKERHUB_USERNAME }}/${{ env.tag_name }} . --platform=linux/amd64

- name: Run Tag Docker
run: docker tag ${{ secrets.WEB_ACCESS_DOCKERHUB_USERNAME }}/${{ env.tag_name }} ${{ secrets.WEB_ACCESS_DOCKERHUB_USERNAME }}/${{ env.tag_name }}

- name: Run Push Docker
run: docker push ${{ secrets.WEB_ACCESS_DOCKERHUB_USERNAME }}/${{ env.tag_name }}
21 changes: 19 additions & 2 deletions .github/workflows/release_production.yml
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ jobs:
- name: Versioning
uses: "./.github/actions/versioning"
with:
RELEASE_TYPE: $RELEASE_TYPE
RELEASE_TYPE: ${{ env.RELEASE_TYPE }}
- name: Extract version
id: extract_version
run: echo "RELEASE_VERSION=${version}" >> $GITHUB_OUTPUT
Expand Down Expand Up @@ -90,7 +90,7 @@ jobs:
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }}
MESSAGE: "${{ env.RELEASE_TYPE }} Release succeeded for app.deriv.com with version ${{ needs.build_test_and_publish.outputs.RELEASE_VERSION }}"

build_and_publish_to_docker_k8s:
build_and_publish_to_DR_solution:
name: Build Docker image and push to Docker hub and K8S
runs-on: Runner_8cores_Deriv-app
environment: Production
Expand Down Expand Up @@ -121,3 +121,20 @@ jobs:
with:
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }}
MESSAGE: "${{ env.RELEASE_TYPE }} Docker Publish and Kubernetes Deployment for app.deriv.com with version ${{ needs.build_test_and_publish.outputs.RELEASE_VERSION }} has Failed"
- name: Upload to vercel
id: vercel-upload
uses: 'deriv-com/shared-actions/.github/actions/vercel_DR_publish@master'
with:
VERCEL_ORG_ID: ${{ secrets.VERCEL_ORG_ID }}
VERCEL_PROJECT_ID: ${{ secrets.VERCEL_PROJECT_ID }}
VERCEL_TOKEN: ${{ secrets.VERCEL_API_TOKEN }}
ENVIRONMENT: Production
VERCEL_SCOPE: deriv
ALIAS_DOMAIN_URL: 'app-dr.binary.sx'

- name: Send DR Slack Notification
uses: "deriv-com/shared-actions/.github/actions/send_slack_notification@master"
if: ${{ steps.vercel-upload.outcome != 'success' }}
with:
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }}
MESSAGE: Disaster Recovery Release to vercel failed for app.deriv.com with version ${{ needs.build_test_and_publish.outputs.RELEASE_VERSION }}
19 changes: 9 additions & 10 deletions .github/workflows/release_staging.yml
Original file line number Diff line number Diff line change
Expand Up @@ -53,14 +53,13 @@ jobs:
CLOUDFLARE_ACCOUNT_ID: ${{ secrets.CLOUDFLARE_ACCOUNT_ID }}
CLOUDFLARE_API_TOKEN: ${{ secrets.CLOUDFLARE_API_TOKEN }}

- name: Build Docker image and push to Docker hub and K8S
uses: "./.github/actions/build_and_push_docker_image"
- name: Upload to vercel
id: vercel-upload
uses: 'deriv-com/shared-actions/.github/actions/vercel_DR_publish@master'
with:
DOCKERHUB_USERNAME: ${{ secrets.DOCKERHUB_USERNAME }}
DOCKERHUB_PASSWORD: ${{ secrets.DOCKERHUB_PASSWORD }}
DOCKERHUB_ORGANISATION: ${{ secrets.DOCKERHUB_ORGANISATION }}
K8S_NAMESPACE: ${{ secrets.K8S_NAMESPACE }}
KUBE_SERVER: ${{ secrets.KUBE_SERVER }}
SERVICEACCOUNT_TOKEN: ${{ secrets.SERVICEACCOUNT_TOKEN }}
CA_CRT: ${{ secrets.CA_CRT }}
APP_VERSION: latest-staging
VERCEL_ORG_ID: ${{ secrets.VERCEL_ORG_ID }}
VERCEL_PROJECT_ID: ${{ secrets.VERCEL_PROJECT_ID }}
VERCEL_TOKEN: ${{ secrets.VERCEL_API_TOKEN }}
ENVIRONMENT: Production
VERCEL_SCOPE: deriv
ALIAS_DOMAIN_URL: 'staging-app-dr.binary.sx'
2 changes: 0 additions & 2 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,8 +35,6 @@ jobs:
run: npx tsc --project packages/stores/tsconfig.json -noEmit
- name: Check TypeScript for @deriv/wallets
run: npx tsc --project packages/wallets/tsconfig.json -noEmit
- name: Check TypeScript for @deriv/cashier-v2
run: npx tsc --project packages/cashier-v2/tsconfig.json -noEmit
- name: Check ESLint for @deriv/wallets
run: npx eslint --fix --ignore-path packages/wallets/.eslintignore --config packages/wallets/.eslintrc.js packages/wallets
- name: Check ESLint for @deriv/cashier-v2
Expand Down
2 changes: 1 addition & 1 deletion .stylelintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ module.exports = {
'shorthand-property-no-redundant-values': true,
'string-no-newline': true,
'time-min-milliseconds': 100,
'unit-allowed-list': ['fr', 'px', 'em', 'rem', '%', 'svh', 'svw', 'vw', 'vh', 'deg', 'ms', 's', 'dpcm'],
'unit-allowed-list': ['fr', 'px', 'em', 'rem', '%', 'svh', 'svw', 'vw', 'vh', 'dvh', 'deg', 'ms', 's', 'dpcm'],
'value-keyword-case': 'lower',
},
extends: [
Expand Down
Loading

0 comments on commit 5b27f06

Please sign in to comment.