-
Notifications
You must be signed in to change notification settings - Fork 5
54 lines (52 loc) · 1.7 KB
/
on-demand-migrate-user-labs-rollback.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
name: Migrate user labs rollback
on:
workflow_dispatch:
inputs:
environment-name:
required: true
description: The environment name
type: choice
options:
- Branch
- Development
- Production
contentful-env:
required: true
type: string
description: Choose the Contentful environment to migrate user labs
jobs:
migrate_user_labs_rollback:
runs-on: ubuntu-latest
environment: ${{ inputs.environment-name }}
container:
image: ghcr.io/yldio/asap-hub/node-python-sq:7b77d99657ab3718ed548ba366ffbcbb15315fd8
credentials:
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Setup
id: setup
uses: ./.github/actions/setup-environment
with:
environment-name: ${{ inputs.environment-name }}
- name: Run User Assignment as Lab PI Migration
run: |
yarn workspace @asap-hub/contentful migrate-assign-users-as-lab-pi
env:
CONTENTFUL_MANAGEMENT_ACCESS_TOKEN: ${{ secrets.CONTENTFUL_MANAGEMENT_TOKEN }}
CONTENTFUL_SPACE_ID: ${{ steps.setup.outputs.crn-contentful-space-id }}
CONTENTFUL_ENV_ID: ${{ inputs.contentful-env }}
notify_failure:
runs-on: ubuntu-latest
needs: [migrate_user_labs_rollback]
if: ${{ failure() && inputs.environment-name=='Production' }}
steps:
- name: Checkout
uses: actions/checkout@v3
- uses: ./.github/actions/slack/
with:
message: Migrate user labs rollback failed
webhook: ${{ secrets.SLACK_WEBHOOK }}
status: failure