translations: π sync translations with crowdin (#15240) #134
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Deriv App Production Workflow | |
on: | |
push: | |
tags: | |
- production_* | |
env: | |
RELEASE_TYPE: Production | |
jobs: | |
build_test_and_publish: | |
name: Build, Test and Publish to Cloudflare Pages Production | |
environment: Production | |
runs-on: Runner_16cores_Deriv-app | |
outputs: | |
RELEASE_VERSION: ${{ steps.extract_version.outputs.RELEASE_VERSION }} | |
steps: | |
- name: Checkout | |
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 | |
- name: Setup Node | |
uses: "./.github/actions/setup_node" | |
- name: Install Dependencies | |
uses: "./.github/actions/npm_install_from_cache" | |
- name: Download Remote Config Backup File | |
uses: ./.github/actions/download_remote_config_backup | |
with: | |
REMOTE_CONFIG_URL: ${{ vars.REMOTE_CONFIG_URL }} | |
- name: Build | |
uses: "./.github/actions/build" | |
with: | |
NODE_ENV: production | |
DATADOG_APPLICATION_ID: ${{ vars.DATADOG_APPLICATION_ID }} | |
IS_GROWTHBOOK_ENABLED: ${{ vars.IS_GROWTHBOOK_ENABLED }} | |
DATADOG_CLIENT_TOKEN: ${{ vars.DATADOG_CLIENT_TOKEN }} | |
DATADOG_CLIENT_TOKEN_LOGS: ${{ vars.DATADOG_CLIENT_TOKEN_LOGS }} | |
DATADOG_SESSION_REPLAY_SAMPLE_RATE: ${{ vars.DATADOG_SESSION_REPLAY_SAMPLE_RATE }} | |
DATADOG_SESSION_SAMPLE_RATE: ${{ vars.DATADOG_SESSION_SAMPLE_RATE }} | |
DATADOG_SESSION_SAMPLE_RATE_LOGS: ${{ vars.DATADOG_SESSION_SAMPLE_RATE_LOGS }} | |
GD_API_KEY: ${{ secrets.GD_API_KEY }} | |
GD_APP_ID: ${{ secrets.GD_APP_ID }} | |
GD_CLIENT_ID: ${{ secrets.GD_CLIENT_ID }} | |
RUDDERSTACK_KEY: ${{ vars.RUDDERSTACK_KEY }} | |
GROWTHBOOK_CLIENT_KEY: ${{ vars.GROWTHBOOK_CLIENT_KEY }} | |
GROWTHBOOK_DECRYPTION_KEY: ${{ vars.GROWTHBOOK_DECRYPTION_KEY }} | |
REF_NAME: ${{ github.ref_name }} | |
REMOTE_CONFIG_URL: ${{ vars.REMOTE_CONFIG_URL }} | |
- name: Run tests | |
run: npm test | |
- name: Versioning | |
uses: "./.github/actions/versioning" | |
with: | |
RELEASE_TYPE: $RELEASE_TYPE | |
- name: Extract version | |
id: extract_version | |
run: echo "RELEASE_VERSION=${version}" >> $GITHUB_OUTPUT | |
- name: Publish to Cloudflare Pages Production | |
uses: "./.github/actions/publish_to_pages_production" | |
with: | |
CLOUDFLARE_ACCOUNT_ID: ${{ secrets.CLOUDFLARE_ACCOUNT_ID }} | |
CLOUDFLARE_API_TOKEN: ${{ secrets.CLOUDFLARE_API_TOKEN }} | |
- name: Upload Build Artifact | |
uses: actions/upload-artifact@26f96dfa697d77e81fd5907df203aa23a56210a8 | |
with: | |
name: build | |
path: packages/core/dist | |
retention-days: 1 | |
send_slack_failure: | |
name: Send Release Slack notification failure | |
runs-on: Runner_8cores_Deriv-app | |
environment: Production | |
if: failure() | |
needs: [build_test_and_publish] | |
steps: | |
- name: Send Slack Notification | |
uses: "deriv-com/shared-actions/.github/actions/send_slack_notification@master" | |
with: | |
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }} | |
MESSAGE: "${{ env.RELEASE_TYPE }} Release failed for app.deriv.com with version ${{ needs.build_test_and_publish.outputs.RELEASE_VERSION }}" | |
send_slack_success: | |
name: Send Release Slack notification success | |
runs-on: Runner_8cores_Deriv-app | |
environment: Production | |
if: success() | |
needs: [build_test_and_publish] | |
steps: | |
- name: Send Slack Notification | |
uses: "deriv-com/shared-actions/.github/actions/send_slack_notification@master" | |
with: | |
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: | |
name: Build Docker image and push to Docker hub and K8S | |
runs-on: Runner_8cores_Deriv-app | |
environment: Production | |
needs: [build_test_and_publish] | |
steps: | |
- name: Checkout | |
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 | |
- name: Download Build Artifact | |
uses: actions/download-artifact@6b208ae046db98c579e8a3aa621ab581ff575935 | |
with: | |
name: build | |
path: packages/core/dist | |
- name: Build Docker image and push to Docker hub and K8S | |
id: build_and_push_docker_image | |
uses: "./.github/actions/build_and_push_docker_image" | |
with: | |
DOCKERHUB_USERNAME: ${{ secrets.DOCKER_USERNAME }} | |
DOCKERHUB_PASSWORD: ${{ secrets.DOCKER_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 | |
- name: Send Slack Notification on Docker Publish and Kubernetes Deployment Failure | |
if: ${{ steps.build_and_push_docker_image.outcome != 'success' }} | |
uses: "deriv-com/shared-actions/.github/actions/send_slack_notification@master" | |
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" |