-
Notifications
You must be signed in to change notification settings - Fork 83
55 lines (48 loc) · 2.15 KB
/
deploy-beta.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
name: Deploy BETA/BugBash Feature
on:
workflow_dispatch:
permissions:
id-token: write # allows the JWT to be requested from GitHub's OIDC provider
contents: read # This is required for actions/checkout
env:
NODE_OPTIONS: "--no-warnings"
jobs:
get-deploy-inputs:
name: Get Deploy Inputs
if: startsWith(github.ref, 'refs/heads/beta/') || startsWith(github.ref, 'refs/tags/bugbash/')
runs-on: [self-hosted, Linux, X64]
outputs:
release_type: ${{ steps.deploy-inputs.outputs.release_type }}
feature_name: ${{ steps.deploy-inputs.outputs.feature_name }}
steps:
- name: Extract deploy inputs
id: deploy-inputs
shell: bash
run: |
source_branch_name=${GITHUB_REF##*/}
RELEASE_TYPE=beta
grep -q "bugbash/" <<< "${GITHUB_REF}" && RELEASE_TYPE=bugbash
FEATURE_NAME=${source_branch_name#bugbash/}
FEATURE_NAME=${FEATURE_NAME#beta/}
FEATURE_NAME=${FEATURE_NAME#refs/heads/}
FEATURE_NAME=${FEATURE_NAME#refs/tags/}
echo "release_type=$RELEASE_TYPE" >> $GITHUB_OUTPUT
echo "feature_name=$FEATURE_NAME" >> $GITHUB_OUTPUT
deploy:
name: Deploy BETA/BugBash Feature
uses: ./.github/workflows/deploy.yml
needs: get-deploy-inputs
with:
environment: ${{ needs.get-deploy-inputs.outputs.release_type }}
bugsnag_release_stage: ${{ needs.get-deploy-inputs.outputs.release_type }}
s3_dir_path: ${{ needs.get-deploy-inputs.outputs.release_type }}/${{ needs.get-deploy-inputs.outputs.feature_name }}
s3_dir_path_legacy: ${{ needs.get-deploy-inputs.outputs.release_type }}/${{ needs.get-deploy-inputs.outputs.feature_name }}/v1.1
action_type: ''
secrets:
AWS_ACCOUNT_ID: ${{ secrets.AWS_PROD_ACCOUNT_ID }}
AWS_S3_BUCKET_NAME: ${{ secrets.AWS_PROD_S3_BUCKET_NAME }}
AWS_S3_SYNC_ROLE: ${{ secrets.AWS_PROD_S3_SYNC_ROLE }}
AWS_CF_DISTRIBUTION_ID: ${{ secrets.AWS_PROD_CF_DISTRIBUTION_ID }}
BUGSNAG_API_KEY: ${{ secrets.RS_PROD_BUGSNAG_API_KEY }}
SLACK_BOT_TOKEN: ${{ secrets.SLACK_BOT_TOKEN }}
SLACK_RELEASE_CHANNEL_ID: ${{ secrets.SLACK_RELEASE_CHANNEL_ID_NON_PROD }}