Skip to content

Commit

Permalink
Merge pull request #824 from adrienne-deriv/env-for-analytics
Browse files Browse the repository at this point in the history
Adrienne / Added environment variables for analytics initialisation
  • Loading branch information
ali-hosseini-deriv authored Oct 3, 2024
2 parents 2ef7d3f + 03e0491 commit 02c199b
Show file tree
Hide file tree
Showing 4 changed files with 21 additions and 0 deletions.
8 changes: 8 additions & 0 deletions .github/actions/build/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,19 @@ inputs:
description: "Target Environment"
required: true
default: staging
RUDDERSTACK_KEY:
description: "Rudderstack key for initialising analytics"
required: false
GROWTHBOOK_CLIENT_KEY:
description: "Growthbook client key for initialising analytics"
required: false
runs:
using: composite
steps:
- name: Building dist for ${{ inputs.target }}
env:
TARGET_ENV: ${{ inputs.target }}
RUDDERSTACK_KEY: ${{ inputs.RUDDERSTACK_KEY }}
GROWTHBOOK_CLIENT_KEY: ${{ inputs.GROWTHBOOK_CLIENT_KEY }}
run: node_modules/grunt/bin/grunt releaseci --$TARGET_ENV
shell: bash
5 changes: 5 additions & 0 deletions .github/workflows/generate_preview_link.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ concurrency:
jobs:
build_and_deploy_preview_link:
runs-on: Ubuntu-latest
environment: Development
permissions:
checks: write
pull-requests: write
Expand Down Expand Up @@ -48,11 +49,15 @@ jobs:
uses: "./.github/actions/build"
with:
target: staging
RUDDERSTACK_KEY: ${{ vars.RUDDERSTACK_KEY }}
GROWTHBOOK_CLIENT_KEY: ${{ vars.GROWTHBOOK_CLIENT_KEY }}

- name: Build Translations
uses: "./.github/actions/build"
with:
target: translations
RUDDERSTACK_KEY: ${{ vars.RUDDERSTACK_KEY }}
GROWTHBOOK_CLIENT_KEY: ${{ vars.GROWTHBOOK_CLIENT_KEY }}

- name: "Run Tests"
run: npm run test
Expand Down
3 changes: 3 additions & 0 deletions .github/workflows/release_production.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ on:
jobs:
build_and_test:
name: Build and Test
environment: Production
runs-on: ubuntu-latest
env:
RELEASE_TYPE: Production
Expand All @@ -22,6 +23,8 @@ jobs:
uses: "./.github/actions/build"
with:
target: production
RUDDERSTACK_KEY: ${{ vars.RUDDERSTACK_KEY }}
GROWTHBOOK_CLIENT_KEY: ${{ vars.GROWTHBOOK_CLIENT_KEY }}
- name: Versioning
uses: "./.github/actions/versioning"
with:
Expand Down
5 changes: 5 additions & 0 deletions .github/workflows/release_staging.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ on:
jobs:
build_and_test:
name: Build and Test
environment: Staging
runs-on: ubuntu-latest
steps:
- name: Checkout
Expand All @@ -20,10 +21,14 @@ jobs:
uses: "./.github/actions/build"
with:
target: staging
RUDDERSTACK_KEY: ${{ vars.RUDDERSTACK_KEY }}
GROWTHBOOK_CLIENT_KEY: ${{ vars.GROWTHBOOK_CLIENT_KEY }}
- name: Build Translations
uses: "./.github/actions/build"
with:
target: translations
RUDDERSTACK_KEY: ${{ vars.RUDDERSTACK_KEY }}
GROWTHBOOK_CLIENT_KEY: ${{ vars.GROWTHBOOK_CLIENT_KEY }}
- name: Versioning
uses: "./.github/actions/versioning"
with:
Expand Down

0 comments on commit 02c199b

Please sign in to comment.