fix: event queue issues #30
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Deploy BETA/BugBash Feature | |
on: | |
workflow_dispatch: | |
pull_request: | |
branches: ['main'] | |
types: | |
- opened | |
- synchronize | |
- reopened | |
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/') || startsWith(github.head_ref, 'beta/') | |
runs-on: [self-hosted, Linux, X64] | |
outputs: | |
release_type: ${{ steps.deploy-inputs.outputs.release_type }} | |
latest_feature_name: ${{ steps.deploy-inputs.outputs.latest_feature_name }} | |
commit_feature_name: ${{ steps.deploy-inputs.outputs.commit_feature_name }} | |
steps: | |
- name: Extract deploy inputs | |
id: deploy-inputs | |
shell: bash | |
run: | | |
source_branch_name=${{ github.head_ref }} | |
echo "source_branch_name=$source_branch_name" | |
RELEASE_TYPE=beta | |
grep -q "bugbash/" <<< "${${{ github.head_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 "feature_name=$FEATURE_NAME" | |
LATEST_FEATURE_NAME="${FEATURE_NAME}/latest" | |
COMMIT_FEATURE_NAME="${FEATURE_NAME}/$(echo ${{ github.event.pull_request.head.sha }} | cut -c1-7)" | |
echo "release_type=$RELEASE_TYPE" >> $GITHUB_OUTPUT | |
echo "latest_feature_name=$LATEST_FEATURE_NAME" >> $GITHUB_OUTPUT | |
echo "commit_feature_name=$COMMIT_FEATURE_NAME" >> $GITHUB_OUTPUT | |
echo "release_type=$RELEASE_TYPE" | |
echo "latest_feature_name=$LATEST_FEATURE_NAME" | |
echo "commit_feature_name=$COMMIT_FEATURE_NAME" | |
deploy-latest: | |
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.latest_feature_name }} | |
s3_dir_path_legacy: ${{ needs.get-deploy-inputs.outputs.release_type }}/${{ needs.get-deploy-inputs.outputs.latest_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 }} | |
deploy-commit: | |
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.commit_feature_name }} | |
s3_dir_path_legacy: ${{ needs.get-deploy-inputs.outputs.release_type }}/${{ needs.get-deploy-inputs.outputs.commit_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 }} |