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

Merge pull request #465 from farabi-deriv/webrel-2859/binary-bot-tran… #75

Merge pull request #465 from farabi-deriv/webrel-2859/binary-bot-tran…

Merge pull request #465 from farabi-deriv/webrel-2859/binary-bot-tran… #75

name: deriv-com/binary-bot/release-staging
on:
push:
branches:
- master
jobs:
release_staging:
name: Build, Test and Deploy to Cloudflare Pages
environment: Staging
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup Node
uses: "./.github/actions/setup_node"
with:
node-version: "18.x"
- name: Install Dependencies
uses: "./.github/actions/npm_install_from_cache"
- name: Build
uses: "./.github/actions/build"
with:
NODE_ENV: staging
GD_API_KEY: ${{ secrets.GD_API_KEY }}
GD_APP_ID: ${{ secrets.GD_APP_ID }}
GD_CLIENT_ID: ${{ secrets.GD_CLIENT_ID }}
TRACKJS_TOKEN: ${{ secrets.TRACKJS_TOKEN }}
DATADOG_CLIENT_LOGS_TOKEN: ${{ secrets.DATADOG_CLIENT_LOGS_TOKEN }}
DATADOG_LOGS_SESSION_SAMPLE_RATE: ${{ secrets.DATADOG_LOGS_SESSION_SAMPLE_RATE }}
REF_NAME: ${{ github.ref_name }}
- name: Test
uses: "./.github/actions/test"
- name: Deploy to Cloudflare Pages
uses: "./.github/actions/publish_to_cf_pages_staging"
with:
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"
with:
DOCKERHUB_USERNAME: ${{ secrets.DOCKERHUB_USERNAME }}
DOCKERHUB_PASSWORD: ${{ secrets.DOCKERHUB_PASSWORD }}
DOCKERHUB_ORGANISATION: ${{ secrets.DOCKERHUB_ORGANISATION }}
K8S_NAMESPACE: bot-deriv-com-staging
KUBE_SERVER: ${{ secrets.KUBE_SERVER }}
SERVICEACCOUNT_TOKEN: ${{ secrets.SERVICEACCOUNT_TOKEN }}
CA_CRT: ${{ secrets.CA_CRT }}
APP_VERSION: latest-staging
send_slack_notification:
if: always()
needs: [release_staging]
environment: Staging
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Conclusion
uses: technote-space/workflow-conclusion-action@45ce8e0eb155657ab8ccf346ade734257fd196a5
- name: Send Slack Notification
uses: "./.github/actions/send_slack_notifications"
with:
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }}
status: ${{ env.WORKFLOW_CONCLUSION }}
release_type: Staging
version: latest-master
app_url: https://staging-bot.deriv.com/