-
Notifications
You must be signed in to change notification settings - Fork 5
57 lines (56 loc) · 1.86 KB
/
on-demand-rollback-contentful-migration.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
name: Sync Analytics Algolia
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
pr-number:
required: false
type: string
description: The PR number to run for
dedicated-contentful-environment:
required: false
type: boolean
default: false
jobs:
algolia:
uses: ./.github/workflows/reusable-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