Skip to content

Migrate user labs

Migrate user labs #42

name: CRN Analytics Algolia Sync
on:
workflow_dispatch:
inputs:
metric:
required: false
type: choice
description: Choose which metric to sync
default: all
options:
- team-leadership
- all
environment-name:
required: true
type: environment
description: Choose which environment to sync
default: Branch
contentful-environment-id:
required: true
type: string
description: The contentful environment to sync from
default: Development
dedicated-contentful-environment:
required: false
type: boolean
default: false
pr-number:
required: false
type: string
description: The PR number to run for
jobs:
algolia:
uses: ./.github/workflows/reusable-crn-analytics-algolia-sync.yml
with:
environment-name: ${{ github.event.inputs.environment-name }}
metric: ${{ github.event.inputs.metric }}
pr-number: ${{ github.event.inputs.pr-number }}
dedicated-contentful-environment: ${{ inputs.dedicated-contentful-environment }}
contentful-environment-id: ${{ github.event.inputs.contentful-environment-id }}
secrets:
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
CRN_CONTENTFUL_ACCESS_TOKEN: ${{ secrets.CRN_CONTENTFUL_ACCESS_TOKEN }}
CONTENTFUL_MANAGEMENT_TOKEN: ${{ secrets.CONTENTFUL_MANAGEMENT_TOKEN }}
notify_failure:
runs-on: ubuntu-latest
needs: [algolia]
if: ${{ failure() && github.event.inputs.environment-name=='Production' }}
steps:
- name: Checkout
uses: actions/checkout@v3
- uses: ./.github/actions/slack/
with:
message: Analytics Algolia Prod Sync
webhook: ${{ env.SLACK_WEBHOOK }}
status: failure